diff --git a/api/event/serializers.py b/api/event/serializers.py index 8cc80cf..a18794f 100644 --- a/api/event/serializers.py +++ b/api/event/serializers.py @@ -78,7 +78,7 @@ class ActivityTemplateSerializer(serializers.ModelSerializer): instance.save() tags = [ActivityTag.objects.get_or_create(event=event, **tag_data)[0] for tag_data in tags_data] - instance.tags = tags + instance.tags.set(tags) return instance def create(self, validated_data): diff --git a/api/event/views.py b/api/event/views.py index 7add4bf..b360583 100644 --- a/api/event/views.py +++ b/api/event/views.py @@ -15,11 +15,11 @@ class EventSpecificViewSet(ModelViewSet): """ ViewSet that returns : * rootlevel objects if no Event is specified - * OR objects related to the specidied event + * OR objects related to the specified event AND root level objects if an event is specified it passes the event_pk to the save method. Works fine with serializers.EventSpecificSerializer - Useful for models that exetends EventSpecificMixin + Useful for models that extends EventSpecificMixin """ def get_queryset(self): """