Message7454
Hi Nagy:
Thanks for identifying the issue and your patch. Can you try replacing your change with:
try:
if labelprop is not None and \
labelprop != 'id':
- label = linkcl.get(linkid, labelprop)
+ label = linkcl.get(linkid, labelprop,
+ default=self._("[la\
bel is missing]"))
label = html_escape(label)
and tell me if it still fixes the issue. Feel free to replace the string "[label is missing]".
Keep the self._() call as it allows the string to be localized. Given how get() is
implemented, I think this is the better way to fix the issue.
Also an added benefit is to allow the string to be translated or overridden using the
translation system.
I just wish I could figure out how to test this code. I have spent more than an hour
trying to figure out how to get a test and database entries right to trigger this code.
-- rouilj |
|
Date |
User |
Action |
Args |
2022-02-21 03:33:56 | rouilj | set | messageid: <1645414436.84.0.86020184496.issue2551196@roundup.psfhosted.org> |
2022-02-21 03:33:56 | rouilj | set | recipients:
+ rouilj, ngaba |
2022-02-21 03:33:56 | rouilj | link | issue2551196 messages |
2022-02-21 03:33:56 | rouilj | create | |
|