Opened 8 years ago

Closed 8 years ago

#7887 closed (duplicate)

Allow empty constants in templates

Reported by: Joost Cassee Owned by: nobody
Component: Template system Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

The Variable class does not accept empty constants ("") in templates. The error message is:

Could not find variable at start of ""

I traced the error to the __init__ method of FilterExpression. The attached diff fixes the error. I think some of the surrounding if <var> statements should also be rewritten as if <var> is not None, but the diff is restricted to fixing this bug.

Attachments (1)

empty-constants.diff (633 bytes) - added by Joost Cassee 8 years ago.
7887-trunk-v1.diff

Download all attachments as: .zip

Change History (2)

Changed 8 years ago by Joost Cassee

Attachment: empty-constants.diff added

7887-trunk-v1.diff

comment:1 Changed 8 years ago by Johannes Dollinger

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Resolution: duplicate
Status: newclosed

duplicate of #5270.

Note: See TracTickets for help on using tickets.
Back to Top