Skip to content

Commit

Permalink
- [Fixes #204]: Ceating a New GeoStory Displays a Network Error (#208)
Browse files Browse the repository at this point in the history
  • Loading branch information
marthamareal authored May 26, 2021
1 parent 0918ab7 commit 6752c37
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mapstore2_adapter/geoapps/geostories/api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,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 \
Expand Down

0 comments on commit 6752c37

Please sign in to comment.