File tree 9 files changed +45
-23
lines changed
src/design/plone/contenttypes
9 files changed +45
-23
lines changed Original file line number Diff line number Diff line change 6
6
strategy :
7
7
fail-fast : false
8
8
matrix :
9
- python-version : [3.9 ]
9
+ python-version : [3.11 ]
10
10
11
11
steps :
12
12
# git checkout
13
- - uses : actions/checkout@v2
13
+ - uses : actions/checkout@v4
14
14
15
15
# python setup
16
16
- name : Set up Python ${{ matrix.python-version }}
17
- uses : actions/setup-python@v1
17
+ uses : actions/setup-python@v5
18
18
with :
19
19
python-version : ${{ matrix.python-version }}
20
20
21
21
# python cache
22
- - uses : actions/cache@v1
22
+ - uses : actions/cache@v4
23
23
with :
24
24
path : ~/.cache/pip
25
25
key : ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
Original file line number Diff line number Diff line change 6
6
strategy :
7
7
fail-fast : false
8
8
matrix :
9
- python-version : [3.9 ]
9
+ python-version : [3.11 ]
10
10
11
11
steps :
12
12
# git checkout
13
- - uses : actions/checkout@v2
13
+ - uses : actions/checkout@v4
14
14
15
15
# python setup
16
16
- name : Set up Python ${{ matrix.python-version }}
17
- uses : actions/setup-python@v1
17
+ uses : actions/setup-python@v5
18
18
with :
19
19
python-version : ${{ matrix.python-version }}
20
20
21
21
# python cache
22
- - uses : actions/cache@v1
22
+ - uses : actions/cache@v4
23
23
with :
24
24
path : ~/.cache/pip
25
25
key : ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
Original file line number Diff line number Diff line change 6
6
strategy :
7
7
fail-fast : false
8
8
matrix :
9
- python-version : [3.9 ]
9
+ python-version : [3.11 ]
10
10
11
11
steps :
12
12
# git checkout
13
- - uses : actions/checkout@v2
13
+ - uses : actions/checkout@v4
14
14
15
15
# python setup
16
16
- name : Set up Python ${{ matrix.python-version }}
17
- uses : actions/setup-python@v1
17
+ uses : actions/setup-python@v5
18
18
with :
19
19
python-version : ${{ matrix.python-version }}
20
20
21
21
# python cache
22
- - uses : actions/cache@v1
22
+ - uses : actions/cache@v4
23
23
with :
24
24
path : ~/.cache/pip
25
25
key : ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
Original file line number Diff line number Diff line change 8
8
strategy :
9
9
max-parallel : 4
10
10
matrix :
11
- python : ["3.9 "]
11
+ python : ["3.8 "]
12
12
plone : ["52"]
13
13
steps :
14
- - uses : actions/checkout@v1
14
+ - uses : actions/checkout@v4
15
15
- name : Cache eggs
16
- uses : actions/cache@v1
16
+ uses : actions/cache@v4
17
17
with :
18
18
path : eggs
19
19
key : ${{ runner.OS }}-build-python${{ matrix.python }}-${{ matrix.plone }}
20
20
- name : Set up Python ${{ matrix.python }}
21
- uses : actions/setup-python@v1
21
+ uses : actions/setup-python@v5
22
22
with :
23
23
python-version : ${{ matrix.python }}
24
24
- name : Install dependencies
25
25
run : |
26
26
pip install -r requirements.txt -c constraints_plone${{ matrix.plone }}.txt
27
+ pip install zc.buildout==3.3
27
28
sudo apt-get install libtiff5-dev libjpeg8-dev libopenjp2-7-dev zlib1g-dev \
28
29
libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python3-tk \
29
30
libharfbuzz-dev libfribidi-dev libxcb1-dev
Original file line number Diff line number Diff line change 11
11
- name : Install doctoc
12
12
run : |
13
13
sudo npm install -g doctoc
14
- - uses : actions/checkout@v2
14
+ - uses : actions/checkout@v4
15
15
- name : Generate full TOC
16
16
run : |
17
17
doctoc --github --notitle README.md
Original file line number Diff line number Diff line change 6
6
strategy :
7
7
fail-fast : false
8
8
matrix :
9
- python-version : [3.9 ]
9
+ python-version : [3.11 ]
10
10
11
11
steps :
12
12
# git checkout
13
- - uses : actions/checkout@v2
13
+ - uses : actions/checkout@v4
14
14
15
15
# python setup
16
16
- name : Set up Python ${{ matrix.python-version }}
17
- uses : actions/setup-python@v1
17
+ uses : actions/setup-python@v5
18
18
with :
19
19
python-version : ${{ matrix.python-version }}
20
20
21
21
# python cache
22
- - uses : actions/cache@v1
22
+ - uses : actions/cache@v4
23
23
with :
24
24
path : ~/.cache/pip
25
25
key : ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
Original file line number Diff line number Diff line change @@ -5,7 +5,8 @@ Changelog
5
5
5.1.19 (unreleased)
6
6
-------------------
7
7
8
- - Nothing changed yet.
8
+ - Fix typo in Venue serializer that didn't return the right history version.
9
+ [cekk]
9
10
10
11
11
12
5.1.18 (2025-01-21)
Original file line number Diff line number Diff line change @@ -67,7 +67,9 @@ def get_venue_offices(self, result):
67
67
68
68
def __call__ (self , version = None , include_items = True ):
69
69
self .index = "news_venue"
70
- result = super (VenueSerializer , self ).__call__ (version = None , include_items = True )
70
+ result = super (VenueSerializer , self ).__call__ (
71
+ version = version , include_items = True
72
+ )
71
73
result ["venue_services" ] = self .get_venue_services (result )
72
74
result ["sede_di" ] = self .get_venue_offices (result )
73
75
return result
Original file line number Diff line number Diff line change 14
14
from transaction import commit
15
15
from z3c .relationfield import RelationValue
16
16
from zope .component import getUtility
17
+ from zope .event import notify
17
18
from zope .intid .interfaces import IIntIds
19
+ from zope .lifecycleevent import ObjectModifiedEvent
18
20
19
21
import unittest
20
22
@@ -171,3 +173,19 @@ def test_venue_news(self):
171
173
res ["related_news" ][1 ]["@id" ],
172
174
self .news .absolute_url (),
173
175
)
176
+
177
+ def test_venue_history_return_right_data (self ):
178
+ venue = api .content .create (container = self .portal , type = "Venue" , title = "venue1" )
179
+ venue .description = "aaa"
180
+ notify (ObjectModifiedEvent (venue ))
181
+ venue .description = "aaa bbb"
182
+ notify (ObjectModifiedEvent (venue ))
183
+ commit ()
184
+
185
+ response0 = self .api_session .get (f"{ venue .absolute_url ()} /@history/0" ).json ()
186
+ response1 = self .api_session .get (f"{ venue .absolute_url ()} /@history/1" ).json ()
187
+ response2 = self .api_session .get (f"{ venue .absolute_url ()} /@history/2" ).json ()
188
+
189
+ self .assertEqual (response0 ["description" ], "" )
190
+ self .assertEqual (response1 ["description" ], "aaa" )
191
+ self .assertEqual (response2 ["description" ], "aaa bbb" )
You can’t perform that action at this time.
0 commit comments