Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Solution #720

wants to merge 3 commits into from

Conversation

Rabb1t-Artem
Copy link

No description provided.

Copy link

@Den-k0 Den-k0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link

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

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a 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)

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)

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.

Comment on lines +107 to +108
if self.action == "upload_image":
return MovieImageSerializer

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants