This commit is contained in:
GotPPay
2017-11-21 19:19:12 +01:00
parent 662a506a1a
commit d96ddabd61
3 changed files with 16 additions and 12 deletions

View File

@@ -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