mirror of
https://github.com/inventree/InvenTree.git
synced 2025-10-03 15:52:51 +00:00
Handle null user case (#10362)
This commit is contained in:
@@ -491,7 +491,7 @@ class StockItemSerializer(
|
||||
|
||||
def update(self, instance, validated_data):
|
||||
"""Custom update method to pass the user information through to the instance."""
|
||||
instance._user = self.context['user']
|
||||
instance._user = self.context.get('user', None)
|
||||
|
||||
status_custom_key = validated_data.pop('status_custom_key', None)
|
||||
status = validated_data.pop('status', None)
|
||||
|
Reference in New Issue
Block a user