Skip to content

Commit b0d626e

Browse files
committed
Fix batch.propchanged for transitive id properties (would result in a
backtrace when trying to group by property.id)
1 parent c849578 commit b0d626e

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ Fixed:
7373
- issue2117897: Fixed two more places in date.py where seconds can be
7474
rounded to 60.0 and causing exceptions. Change them to 59.999 as was
7575
done in the fix for issue2550802. (Thomas Arendsen Hein)
76+
- Fix batch.propchanged for transitive id properties (would result in a
77+
backtrace when trying to group by property.id)
7678

7779
Minor:
7880
- demo.py usage message improved: explains "nuke" now. (Bernhard Reiter)

roundup/cgi/templating.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2844,7 +2844,8 @@ def propchanged(self, *properties):
28442844
if self.last_item is None:
28452845
return 1
28462846
for property in properties:
2847-
if property == 'id' or isinstance (self.last_item[property], list):
2847+
if property == 'id' or property.endswith ('.id')\
2848+
or isinstance (self.last_item[property], list):
28482849
if (str(self.last_item[property]) !=
28492850
str(self.current_item[property])):
28502851
return 1

0 commit comments

Comments
 (0)