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