mirror of
https://github.com/inventree/InvenTree.git
synced 2025-08-19 18:05:54 +00:00
Record the user information when creating or updating a stock item
This commit is contained in:
@@ -79,6 +79,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