bug fix
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
from math import ceil
|
||||
|
||||
from helix.calculators.bom_helper import add_parts_to_list
|
||||
from helix.calculators.bom_helper import add_parts_to_list, is_inverter_delta
|
||||
from helix.constants import ebom_parts
|
||||
from helix.constants.ebom_parts import *
|
||||
from helix.constants.parts import wire_clip_large, cable_support, cable_support_lid, channel_nut, sunshade
|
||||
from helix.constants.system_type import SystemType
|
||||
from helix.constants.inverter_brand import InverterBrand
|
||||
from helix.forms.ebom_form import InverterBrandForm
|
||||
|
||||
|
||||
class EbomCalculator(object):
|
||||
@@ -39,13 +38,8 @@ class EbomCalculator(object):
|
||||
module_type = self.values.module_type()
|
||||
system_type = self.values.system_type()
|
||||
|
||||
is_delta=None
|
||||
try:
|
||||
is_delta=(self.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
|
||||
is_delta=False
|
||||
is_delta=is_inverter_delta(self.values)
|
||||
print("IS DELTA : ",is_delta)
|
||||
|
||||
inverter_count = 0
|
||||
total_ac_run_length = 0
|
||||
|
||||
Reference in New Issue
Block a user