Ticket: Create / Update Comments issue

this is my code but in UI it still shows :“Was able to update a comment that wasn’t owned
i had also tried making changes in .api file movie.py as suggested by:
Please reply fast.
Thanks in advance

1 Like

That looks fine. I suspect a problem in get_movie(). The tests uses get_movie() so if get_movie() is not correct the other tests may fail.

Hi, I’m also having trouble with Ticket: Create/Update Comments.
Even though I tried implementing the hacks Steeve and Andreas came up with, still nothing.

pytest -m create_update_comments passes, but the code in the status page doesn’t show…

Sorry, but I would not call providing an implementation that respects the requirements a hack.

I only meant to say it was a clever solution.

Ps.: Just found out my error, had to use “ObjectId(comment_id)” instead of just “comment_id”.

1 Like


its not working

The problem isn’t in your update code, no need to mess with movies.py either, this bug seems to be in your migration code.


I also have faced problem with create/update comments. In my configuration, all tests are passed, but update part fails after running status page.
‘Create/Update Comments: Unable to update comment’

I have noticed, in app, POSTed comment_id is not the same as in PUT request in update_comment.

Could you help me?

Do you sort comments by date descending in get_movie()?

1 Like

You are right, thank you! Now it works.

Even after sorting on date descending. I get the same error.

1 Like

Same error and i check movies.py too.
I don’t know what is it

I am having the problem too that I could not get the validated code, even thought my code is the same as the answer provided by the MongoDB site.

Hi @TSE_31838

Can you post in a new thread and include screen shots to help understand what exactly your specific problem is ? That’ll help in getting the right solution to you.

Kindest regards,