Skip to content

Commit 7dd919e

Browse files
committed
- issue2550964 - History can (temporarily) show incorrect value...
when a change is rejected. Fix history function to always use the database values and ignore the current setting in the form.
1 parent 34ed808 commit 7dd919e

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ Fixed:
119119
- issue2551122 - sorted method of MultilinkHTMLProperty does a string
120120
sort even if the property is an integer. Fixed so that the orderprop
121121
for the linked class is used. (John Rouillard, reported by Nagy Gabor)
122+
- issue2550964 - History can (temporarily) show incorrect value when a
123+
change is rejected. Fix history function to always use the database
124+
values and ignore the current setting in the form.
122125

123126
Features:
124127
- issue2550522 - Add 'filter' command to command-line

roundup/cgi/templating.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,6 +1133,12 @@ def history(self, direction='descending', dre=re.compile(r'^\d+$'),
11331133
if not self.is_view_ok():
11341134
return self._('[hidden]')
11351135

1136+
# history should only use database values not current
1137+
# form values. Disable form_wins for the body of the
1138+
# function. Reset it to original value on return.
1139+
orig_form_wins = self._client.form_wins
1140+
self._client.form_wins = False
1141+
11361142
# get the journal, sort and reverse
11371143
history = self._klass.history(self._nodeid, skipquiet=(not showall))
11381144
history.sort(key=lambda a: a[:3])
@@ -1375,6 +1381,9 @@ def history(self, direction='descending', dre=re.compile(r'^\d+$'),
13751381
self._('<th>Args</th>'),
13761382
'</tr>']
13771383
l.append('</table>')
1384+
1385+
self._client.form_wins = orig_form_wins
1386+
13781387
return '\n'.join(l)
13791388

13801389
def renderQueryForm(self):

0 commit comments

Comments
 (0)