Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

undefined dict attributes #4

Closed
davidw opened this Issue · 3 comments

2 participants

@davidw
{"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.

@davidw

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.

@kaos
Owner

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

@kaos kaos was assigned
@kaos
Owner

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 kaos closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.