-
Notifications
You must be signed in to change notification settings - Fork 681
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Solution #720
base: master
Are you sure you want to change the base?
Solution #720
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think, you don't need to add this 3 images to git
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your hard work on this pull request! 😊 There are a few critical issues that need to be addressed before we can proceed. The MovieSessionListSerializer
incorrectly uses MovieImageSerializer
for the movie_image
field, which is designed for a Movie
instance rather than directly handling an ImageField
. This could lead to functionality issues. Additionally, ensure the ImageField
is correctly implemented in the Movie
model as per the task requirements. Once these are resolved, your code will be in great shape! Keep up the good work! 🚀
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
🔄 Fix the issues, commit the changes, and then re-request my review using the Re-request review
button in the Reviewers tab.
@@ -69,6 +105,7 @@ class MovieSessionListSerializer(MovieSessionSerializer): | |||
source="cinema_hall.capacity", read_only=True | |||
) | |||
tickets_available = serializers.IntegerField(read_only=True) | |||
movie_image = MovieImageSerializer(source="movie.image", read_only=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The movie_image
field in MovieSessionListSerializer
is using MovieImageSerializer
, which is designed for a Movie
instance, not directly for an ImageField
. Consider using a simpler field like serializers.ImageField()
if you only need the image URL.
@@ -111,10 +149,18 @@ | |||
taken_places = TicketSeatsSerializer( | |||
source="tickets", many=True, read_only=True | |||
) | |||
movie_image = MovieImageSerializer(many=False, read_only=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly, in MovieSessionDetailSerializer
, the movie_image
field is using MovieImageSerializer
. Ensure this is intended, as it might expect a nested object rather than just the image field.
if self.action == "upload_image": | ||
return MovieImageSerializer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure that MovieImageSerializer
is appropriate for handling image uploads. It should be able to process the image data correctly and update the Movie
instance.
No description provided.