Roundup Tracker - Issues

Message6173

Author joseph_myers
Recipients ber, joseph_myers, schlatterbeck
Date 2018-08-05.23:11:47
Message-id <1533510708.23.0.56676864532.issue2550722@psf.upfronthosting.co.za>
In-reply-to
I've attached a revised and updated version of my patch for this issue.

The hyperdb.py change is the same as before, with the same
justification, except that it's updated so it still applies cleanly
after the Python 3 changes, and test_hyperdbvals.py is also updated so
the testsuite still passes after that change.

In addition, I found another case of this issue where even with the
hyperdb.py patch an internal error occurs: if there is an error (found
by a detector, for example) in the initial attempt to create an object,
with a nonempty setting for a multilink in that attempt, and then "no
selection" is selected by the user and the form resubmitted, but there
is still an error, and an attempt is made by Roundup to render the
object using the submitted form contents with "no selection", then the
templating code produces an internal error trying to produce a menu
entry for the "-<id>" multilink value.  To fix that case, templating.py
is also changed in the latest patch version to remove all such "-<id>"
multilink values.  (If not removed, they cause problems generating a
menu entry: the "make sure we list the current values if they're
retired" logic ends up inserting the "-<id>" value into the options
list, and subsequent code then tries to get the linked-to object.  But
it's not sufficient just to change that logic for adding values to the
options list, because if you do just that then the new menu ends up with
"--<id>" as the value for its "no selection" entry.  So it seems right
to remove such values for all purposes as early as possible in this
templating code.)
History
Date User Action Args
2018-08-05 23:11:48joseph_myerssetmessageid: <1533510708.23.0.56676864532.issue2550722@psf.upfronthosting.co.za>
2018-08-05 23:11:48joseph_myerssetrecipients: + joseph_myers, schlatterbeck, ber
2018-08-05 23:11:48joseph_myerslinkissue2550722 messages
2018-08-05 23:11:47joseph_myerscreate