undefined dict attributes #4

Closed
davidw opened this Issue Aug 30, 2010 · 3 comments

Comments

Projects
None yet
2 participants
Contributor

davidw commented Aug 30, 2010

{"Render variable with empty attribute in dict",
  <<"{{ var1.foo }}">>, [{var1, dict:store(attr, "Othello", dict:new())}], <<"Othello">>},

I'm not sure what this should return, but "undefined" doesn't seem like the best choice, either in terms of django compatibility, or in terms of general usefulness.

Contributor

davidw commented Aug 30, 2010

Fix is pretty simple: return "" instead of undefined in the dict version of find_value. Passes the tests, at least.

I can do a pull request if you want.

Owner

kaos commented Nov 28, 2013

Thanks for the report, I'll look at it.

kaos was assigned Nov 28, 2013

Owner

kaos commented Nov 29, 2013

Hmm.. I would expect an empty value, not "Othello".
I added this test:
{"Render variable with missing attribute in dict", <<"{{ var1.foo }}">>, [{var1, dict:store(bar, "Othello", dict:new())}], <<"">>},

And it passes, no changes needed.

Please reopen if you feel that I missed something.

Update: Doh, I missed it was reported 3 years ago, and no activity on it since.. wow.

kaos closed this Nov 29, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment