Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Test case demonstrating bug: empty string equals zero#1101

Open
aaronkavlie-wf wants to merge 1 commit intoHubSpot:master from
aaronkavlie-wf:string_zero_equality
Open

Test case demonstrating bug: empty string equals zero #1101
aaronkavlie-wf wants to merge 1 commit intoHubSpot:master from
aaronkavlie-wf:string_zero_equality

Conversation

@aaronkavlie-wf
Copy link

@aaronkavlie-wf aaronkavlie-wf commented Aug 4, 2023

I ran into some unexpected template behavior recently with some date comparison logic.
We have to convert null values to empty strings (due to a Jinjava issue removing keys with null values).

Comparing the empty string to 0 evaluates to true. The expected result is false, as they are different types.

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

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /