2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-06 05:30:56 +00:00

Filtering for Build and StockItem

This commit is contained in:
Oliver
2021-07-21 21:34:16 +10:00
parent 9cf372f633
commit 4ee0004c97
4 changed files with 48 additions and 0 deletions

View File

@ -96,6 +96,14 @@ class Build(MPTTModel):
def get_api_url():
return reverse('api-build-list')
def api_instance_filters(self):
return {
'parent': {
'exclude_tree': self.pk,
}
}
def save(self, *args, **kwargs):
try: