Skip to content

Commit

Permalink
Solution fix: flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
Den-k0 committed Dec 13, 2024
1 parent 870be64 commit 91ff077
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cinema/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ class Meta:


class TicketSerializer(serializers.ModelSerializer):
movie_session = serializers.PrimaryKeyRelatedField(queryset=MovieSession.objects.all())
movie_session = serializers.PrimaryKeyRelatedField(
queryset=MovieSession.objects.all()
)

class Meta:
model = Ticket
Expand All @@ -97,7 +99,7 @@ def validate(self, attrs):

if not movie_session:
raise serializers.ValidationError(
{"movie_session": "Movie session is required to validate row and seat."}
{"movie_session": "Movie session is required"}
)

cinema_hall = movie_session.cinema_hall
Expand Down

0 comments on commit 91ff077

Please sign in to comment.