bug fix
This commit is contained in:
@@ -2,6 +2,7 @@ from math import ceil
|
||||
|
||||
from helix.constants.panel_type import PanelType
|
||||
from helix.constants.parts import *
|
||||
from helix.constants.inverter_brand import InverterBrand
|
||||
|
||||
# This story askes for this special parts to be showed
|
||||
# www.pivotaltracker.com/n/projects/1544689/stories/148016595
|
||||
@@ -41,3 +42,12 @@ def get_panel_type_counts(panels):
|
||||
panel_type_counts[panel.panel_type] += 1
|
||||
|
||||
return panel_type_counts
|
||||
|
||||
def is_inverter_delta(values):
|
||||
try:
|
||||
return (values.inverter_brands()[0]['inverter_brand_id']==InverterBrand.DELTA.value)
|
||||
except IndexError :
|
||||
#Some tests are calculating bom without providing inverter brand so inverter_brands is empty
|
||||
#for those tests, inverter brand is irrelevant
|
||||
return False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user