sorted() method of MultilinkHTMLProperty is broken?
Nagy Gabor <[email protected]>
| Newsgroups | gmane.comp.bug-tracking.roundup.user |
|---|---|
| Message-ID | <20230609120100.0780e9bf@Dell> |
Dear Users,
I am using Roundup 2.1.0, and I cannot get the sorted() method of
MultilinkHTMLProperty to work in the web interface.
In schema.py, the class "issue" has the following definition:
issue = IssueClass(db, "issue",
...
documents=Multilink("doc", rev_multilink="owner"),
...
)
The multilinked "doc" class has the following definition:
doc = FileClass(db, "doc",
...
d_feltoltes=Date(), # this is d_upload in Hungarian
...
)
When I try to list the documents of an issue, according to the Roundup
documentation, I am trying to do this in issue.item.html:
<tr tal:repeat="i python:context.documents.sorted('d_feltoltes', reverse=True)">
And this leads to "KeyError: 'd_feltoltes'", induced by the command
prop = self._db.getclass(self._classname).getprops()[property]
in cgi/templating.py/MultilinkHTMLProperty/sorted().
After replacing self._classname to self._prop.classname in that codeline,
it seems to work as expected.
Am I completely oversee something, or this sorted() method is broken,
but nobody uses it?
As I see, this is not patched in Roundup 2.2.0 either.
Regards,
Gábor
PS. I have not fixed the previous mySQL issue yet, I will report the result here.
_______________________________________________
Roundup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/roundup-users