mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Bug fix - ensure pk is set to None
This commit is contained in:
parent
7db938eda0
commit
906766cc0e
@ -494,6 +494,7 @@ class StockItem(models.Model):
|
||||
# Create a new StockItem object, duplicating relevant fields
|
||||
# Nullify the PK so a new record is created
|
||||
new_stock = StockItem.objects.get(pk=self.pk)
|
||||
new_stock.pk = None
|
||||
new_stock.quantity = quantity
|
||||
new_stock.save()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user