summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0029e1f)
raw | patch | inline | side by side (parent: 0029e1f)
author | stefan <stefan@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Thu, 19 Feb 2009 20:03:10 +0000 (20:03 +0000) | ||
committer | stefan <stefan@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Thu, 19 Feb 2009 20:03:10 +0000 (20:03 +0000) |
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4142 57a73879-2fb5-44c3-a270-3262357dd7e2
roundup/cgi/form_parser.py | patch | blob | history |
index ae7ef17e1bae5d47f296125af870684346792b3e..cf6bb2548e1ba0338d06ec1f2890c04930a9af80 100755 (executable)
if entry not in existing:
existing.append(entry)
value = existing
- value.sort()
+ # Sort the value in the same order used by
+ # Multilink.from_raw.
+ value.sort(key = lambda x: int(x))
elif value == '':
# other types should be None'd if there's no value
except IndexError, message:
raise FormError(str(message))
- # make sure the existing multilink is sorted
+ # make sure the existing multilink is sorted. We must
+ # be sure to use the same sort order in all places,
+ # since we want to compare values with "=" or "!=".
+ # The canonical order (given in Multilink.from_raw) is
+ # by the numeric value of the IDs.
if isinstance(proptype, hyperdb.Multilink):
- existing.sort()
+ existing.sort(key = lambda x: int(x))
# "missing" existing values may not be None
if not existing: