mirror of
https://github.com/inventree/InvenTree.git
synced 2025-08-19 18:05:54 +00:00
Merge pull request #2328 from SchrodingersGat/stock-item-create-fix
Record the user information when creating or updating a stock item
This commit is contained in:
@@ -81,6 +81,15 @@ class StockItemSerializer(InvenTree.serializers.InvenTreeModelSerializer):
|
||||
- Includes serialization for the item location
|
||||
"""
|
||||
|
||||
def update(self, instance, validated_data):
|
||||
"""
|
||||
Custom update method to pass the user information through to the instance
|
||||
"""
|
||||
|
||||
instance._user = self.context['user']
|
||||
|
||||
return super().update(instance, validated_data)
|
||||
|
||||
@staticmethod
|
||||
def annotate_queryset(queryset):
|
||||
"""
|
||||
|
Reference in New Issue
Block a user