Fix general category handling

This commit is contained in:
Sean Morley
2024-11-26 17:39:10 -05:00
parent ce0b82acb7
commit adf45ff557
16 changed files with 192 additions and 126 deletions

View File

@@ -118,6 +118,7 @@ class AdventureSerializer(CustomModelSerializer):
def create(self, validated_data):
visits_data = validated_data.pop('visits', [])
category_data = validated_data.pop('category', None)
print(category_data)
adventure = Adventure.objects.create(**validated_data)
for visit_data in visits_data:
Visit.objects.create(adventure=adventure, **visit_data)