Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge blank fields logic #131

Open
set-soft opened this issue Aug 11, 2020 · 0 comments
Open

Merge blank fields logic #131

set-soft opened this issue Aug 11, 2020 · 0 comments

Comments

@set-soft
Copy link
Contributor

The current logic is:

KiBoM/kibom/component.py

Lines 98 to 100 in 06a1486

if this_field == "" or other_field == "":
if not self.prefs.mergeBlankFields:
return False

I don't get it. If the idea is to loosly group fields: should't we be doing a return True?
I mean:

 if this_field == "" or other_field == "": 
     if self.prefs.mergeBlankFields: 
         return True

Note that even when the condition seems to be equivalent it isn't.
In this version of the code we have a chance to return True, in the other don't.

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

No branches or pull requests

1 participant