updating master
This commit is contained in:
@@ -1,12 +1,19 @@
|
||||
from math import ceil
|
||||
|
||||
from helix.constants.panel_type import PanelType
|
||||
from helix.constants.parts import *
|
||||
|
||||
# This story askes for this special parts to be showed
|
||||
# www.pivotaltracker.com/n/projects/1544689/stories/148016595
|
||||
PARTS_SHOWN_EVEN_WITH_0_ELEMENTS = [
|
||||
delta_kit_inverter_mount,
|
||||
delta_kit_inverter_mount_dt
|
||||
]
|
||||
|
||||
def add_parts_to_list(parts_list, parts_to_add, multiplier=1):
|
||||
for part, quantity in parts_to_add.items():
|
||||
previous_value = parts_list.get(part) or 0
|
||||
if quantity != 0:
|
||||
if quantity != 0 or part in PARTS_SHOWN_EVEN_WITH_0_ELEMENTS:
|
||||
parts_list[part] = previous_value + quantity * multiplier
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user