Skip to content

Commit

Permalink
Merge pull request #179 from T0jan/pricing_fixes
Browse files Browse the repository at this point in the history
Fix checks for pricing updates
  • Loading branch information
eeintech committed Oct 14, 2023
2 parents a5a50bb + cea5448 commit f3ad51c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kintree/database/inventree_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ def inventree_create(part_info: dict, kicad=False, symbol=None, footprint=None,
if is_supplier_part_created:
cprint('[INFO]\tSuccess: Added new supplier part', silent=settings.SILENT)

if supplier_part:
if supplier_part and settings.PRICING_UPLOAD:
cprint('\n[MAIN]\tProcessing Price Breaks', silent=settings.SILENT)
inventree_api.update_price_breaks(
supplier_part=supplier_part,
Expand Down Expand Up @@ -811,7 +811,7 @@ def inventree_create_alternate(part_info: dict, part_id='', part_ipn='', show_pr
cprint('[INFO]\tSuccess: Added new supplier part', silent=settings.SILENT)
result = True

if supplier_part:
if supplier_part and settings.PRICING_UPLOAD:
cprint('\n[MAIN]\tProcessing Price Breaks', silent=settings.SILENT)
inventree_api.update_price_breaks(
supplier_part=supplier_part,
Expand Down

0 comments on commit f3ad51c

Please sign in to comment.