Skip to content

Commit

Permalink
Merge pull request #808 from TOMToolkit/bug/sharing_with_tom_demo
Browse files Browse the repository at this point in the history
add user permissions to serializer created targets.
  • Loading branch information
jchate6 authored Jan 3, 2024
2 parents e4b27ad + 978382d commit 5c94c00
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tom_targets/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def create(self, validated_data):
target_lists = validated_data.pop('target_lists', [])

target = Target.objects.create(**validated_data)
target.give_user_access(self.context['request'].user)

# Save user groups for this target
group_serializer = GroupSerializer(data=groups, many=True)
Expand Down

0 comments on commit 5c94c00

Please sign in to comment.