2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-01 11:10:54 +00:00

fix default empy dict

This commit is contained in:
Matthias
2022-01-21 00:11:26 +01:00
parent b2eb4e131a
commit cbd84a23f9
2 changed files with 6 additions and 2 deletions

View File

@ -1022,7 +1022,7 @@ class StockItem(MPTTModel):
def has_tracking_info(self):
return self.tracking_info_count > 0
def add_tracking_entry(self, entry_type, user, deltas={}, notes='', **kwargs):
def add_tracking_entry(self, entry_type, user, deltas=None, notes='', **kwargs):
"""
Add a history tracking entry for this StockItem
@ -1033,6 +1033,8 @@ class StockItem(MPTTModel):
notes - User notes associated with this tracking entry
url - Optional URL associated with this tracking entry
"""
if deltas is None:
deltas = {}
# Has a location been specified?
location = kwargs.get('location', None)