Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
SchrodingersGat committed Feb 14, 2024
1 parent e620a8b commit 9263c23
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions inventree_wireviz/processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,12 +304,12 @@ def convert_quantity(self, quantity, unit, base_unit):
def add_error(self, msg: str):
"""Add an error message."""
self.errors.append(msg)
logger.error(f"WireViz:", msg)
logger.error(f"WireViz: {msg}")

def add_warning(self, msg: str):
"""Add a warning message."""
self.warnings.append(msg)
logger.warning(f"WireViz:", msg)
logger.warning(f"WireViz: {msg}")

def match_part(self, line: dict):
"""Attempt to match a BOM line item to an InvenTree part.
Expand Down Expand Up @@ -398,4 +398,4 @@ def generate_svg_output(self, harness: Harness, filename: str, user):
),
comment=f"Wireviz Harness (autogenerated from {filename})",
user=user
)
)
3 changes: 1 addition & 2 deletions inventree_wireviz/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from .processing import WirevizImportManager



def template_path(template):
"""Return the fully qualified template path from a template string."""

Expand Down Expand Up @@ -153,4 +152,4 @@ def save(self, **kwargs):
path = template_path(template)

if os.path.exists(path) and os.path.isfile(path):
os.remove(path)
os.remove(path)
2 changes: 1 addition & 1 deletion inventree_wireviz/wireviz.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class WirevizPlugin(PanelMixin, ReportMixin, SettingsMixin, UrlsMixin, InvenTree
"HARNESS_CATEGORY": {
'name': 'Wire Harness Category',
'description': 'Select the part category for wire harnesses',
'model': 'part.partcategory',
'model': 'part.partcategory',
},
"WIREVIZ_PATH": {
'name': 'Wireviz Upload Path',
Expand Down

0 comments on commit 9263c23

Please sign in to comment.