Roundup Tracker - Issues

Issue 652089

classification
error in cgi/templates.py
Type: Severity: normal
Components: Web interface Versions:
process
Status: closed fixed
:
: richard : kedder, richard, stefan
Priority: normal :

Created on 2002-12-11 15:41 by stefan, last changed 2002-12-18 09:16 by kedder.

Messages
msg537 Author: [hidden] (stefan) Date: 2002-12-11 15:41
the 'menu' method in class MultilinkHTMLProperty
contains an error:

at line 1144 you declare 'value = self._value',
which is a list.

at line 1160 you make 'value' an iterator over
'self._value'.

at line 1170 you call 'if optionid in value...'

the error I see is due to 'value' not being a list
in line 1170, which is clearly caused by line 1160.
As I guess line 1160's value variable is totally unrelated,
I renamed it to 'for v in self._value...' and everything
works again.
msg538 Author: [hidden] (kedder) Date: 2002-12-18 09:16
Logged In: YES 
user_id=218539

Here is a patch:

Index: roundup/cgi/templating.py
===================================================================
RCS file: /var/lib/cvs/nkm/roundup/roundup/cgi/templating.py,v
retrieving revision 1.1.1.2
diff -r1.1.1.2 templating.py
1160,1162c1160,1162
<         for value in self._value:
<             if value not in options:
<                 options.insert(0, value)
---
>         for val in self._value:
>             if val not in options:
>                 options.insert(0, val)


History
Date User Action Args
2002-12-11 15:41:27stefancreate