Roundup Tracker - Issues

Message1497

Author marlonvdb
Recipients
Date 2004-10-19.10:37:31
Message-id
In-reply-to
Logged In: YES 
user_id=1080231

I might have found the cause and solution for this one.

Method *__getitem__* of  class *HTMLItem*  doesn't look at
the *request/form* values. It should look at those first and
if not there, then look at the database values. Currently it
anly looks at the database values.

In cgi/templating.py line 641 (for 0.7.8) is says:
            value = self._klass.get(self._nodeid, item, None)
Replace that line with:
            form = self._client.form
            if form.has_key(item):
                if isinstance(prop, hyperdb.Multilink):
                    value = lookupIds(self._db, prop,
                        handleListCGIValue(form[item]),
fail_ok=1)
                elif isinstance(prop, hyperdb.Link):
                    value = form[item].value.strip()
                    if value:
                        value = lookupIds(self._db, prop,
[value],
                            fail_ok=1)[0]
                    else:
                        value = None
                else:
                    value = form[item].value.strip() or None
            else:
            	value = self._klass.get(self._nodeid, item, None)
It did solve the problem in our tracker.

Regards,
Marlon
History
Date User Action Args
2009-02-03 14:20:59adminlinkissue1049799 messages
2009-02-03 14:20:59admincreate