Skip to content

Conversation

@heathdutton
Copy link

Fixes #276

The and and or operators were returning boolean values instead of the actual evaluated values. This broke patterns like {% if "x" in (val or "") %} because val or "" evaluated to True instead of the actual string value.

Now matches Python/Django behavior:

  • "hello" or "world" returns "hello" (not True)
  • "" or "default" returns "default" (not True)
  • "hello" and "world" returns "world" (not True)

@sonarqubecloud
Copy link

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

use in in if result not as exepected

1 participant