Skip to content

Fix truthiness#10

Closed
viktormelker wants to merge 7 commits intomasterfrom
fix-truthiness
Closed

Fix truthiness#10
viktormelker wants to merge 7 commits intomasterfrom
fix-truthiness

Conversation

@viktormelker
Copy link
Copy Markdown

@viktormelker viktormelker commented Oct 9, 2024

For code that checks the result using simple if result: statement it is good if we return true only if the rules got a result.
The current (before this PR) behavior caused a concrete issue here since `Result(False, None) was considered truthy.

Let me know what you think about this PR. I'm not sure it is this simple ...

Related PR is https://github.com/fyndiq/accounting-nav-integration-service/pull/192/, I solved it there in another way

@viktormelker viktormelker reopened this Oct 9, 2024
Copy link
Copy Markdown
Contributor

@nf1s nf1s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks outstanding to me

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.

2 participants