Skip to content

Commit

Permalink
- [Fixes #204]: Ceating a New GeoStory Displays a Network Error (#206)
Browse files Browse the repository at this point in the history
  • Loading branch information
marthamareal authored May 26, 2021
1 parent 5309e28 commit c5055f3
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 @@ -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 \
Expand Down

0 comments on commit c5055f3

Please sign in to comment.