Skip to content

Commit

Permalink
fix: lazy format values that evalute to bool-False are not rendered (…
Browse files Browse the repository at this point in the history
…mainly an issue with 0)
  • Loading branch information
saemideluxe committed Aug 31, 2022
1 parent 7199c10 commit 1138e5e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion htmlgenerator/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,8 @@ def get_value(self, key, args, kwds):
def extract(value):
if isinstance(value, BaseElement):
return render(value, self.context)
return resolve_lazy(value, self.context) or ""
v = resolve_lazy(value, self.context)
return "" if v is None else v

ret = super().get_value(
key,
Expand Down

0 comments on commit 1138e5e

Please sign in to comment.