Allow empty constants in templates
|Reported by:||jcassee||Owned by:||nobody|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
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.