Skip to content
This repository has been archived by the owner on Jun 1, 2024. It is now read-only.

Commit

Permalink
not sure why this was necessary for the serializer
Browse files Browse the repository at this point in the history
  • Loading branch information
hcientist committed Jul 20, 2022
1 parent bc91366 commit 5df8c4a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion teleband/musics/api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ def __init__(self, *args, **kwargs):

def create(self, validated_data):
transpositions_data = validated_data.pop("transpositions")
part = Part.objects.create(piece=self.piece, **validated_data)
piece = Piece.objects.get(id=self.piece.id)
# part = Part.objects.create(piece=self.piece, **validated_data)
part = Part.objects.create(piece=piece, **validated_data)

pts = PartTranspositionCreateSerializer(many=True, part=part)
pts.create(transpositions_data)
Expand Down

0 comments on commit 5df8c4a

Please sign in to comment.