diff --git a/mapstore2_adapter/geoapps/geostories/api/serializers.py b/mapstore2_adapter/geoapps/geostories/api/serializers.py index a7887435ee..1d2b1db2fd 100644 --- a/mapstore2_adapter/geoapps/geostories/api/serializers.py +++ b/mapstore2_adapter/geoapps/geostories/api/serializers.py @@ -84,6 +84,12 @@ def to_internal_value(self, data): return data + def validate(self, data): + request = self.context.get('request') + if request: + data['owner'] = request.user + return data + def create(self, validated_data): # Sanity checks if 'name' not in validated_data or \