mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Fixes for unit testing
This commit is contained in:
parent
f243b567fd
commit
eb3b5308ab
@ -168,6 +168,10 @@ class Company(models.Model):
|
||||
""" The number of parts manufactured (or supplied) by this Company """
|
||||
return self.parts.count()
|
||||
|
||||
@property
|
||||
def has_parts(self):
|
||||
return self.part_count > 0
|
||||
|
||||
@property
|
||||
def stock_items(self):
|
||||
""" Return a list of all stock items supplied or manufactured by this company """
|
||||
|
@ -77,7 +77,6 @@ class CompanyIndex(ListView):
|
||||
context = None
|
||||
|
||||
for item in lookup:
|
||||
print(self.request.path, item)
|
||||
if self.request.path == item:
|
||||
context = lookup[item]
|
||||
break
|
||||
|
@ -1268,8 +1268,6 @@ class PartExport(AjaxView):
|
||||
# Filter by part category
|
||||
cat_id = request.GET.get('category', None)
|
||||
|
||||
print('cat_id:', cat_id)
|
||||
|
||||
part_list = None
|
||||
|
||||
if cat_id is not None:
|
||||
|
Loading…
Reference in New Issue
Block a user