Skip to content

Commit

Permalink
Resolve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
marc-vdm committed Dec 20, 2023
1 parent 6e27173 commit 04dd246
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions activity_browser/bwutils/multilca.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,13 @@ def __init__(self, cs_name: str):
cs = bw.calculation_setups[cs_name]
except KeyError:
raise ValueError(
"{} is not a known `calculation_setup`.".format(cs_name)
f"{cs_name} is not a known `calculation_setup`."
)

# check if all values are non-zero
if len([v for rf in cs['inv'] for v in rf.values() if v == 0]) != 0:
# cs['inv'] contains all reference flows (rf),
# all values of rf are the individual reference flow items.
if [v for rf in cs['inv'] for v in rf.values() if v == 0]:
msg = QMessageBox()
msg.setWindowTitle('Reference flows equal 0')
msg.setText('All reference flows must be non-zero.')
Expand Down

0 comments on commit 04dd246

Please sign in to comment.