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

Relationships are not commited, but return no error #1

Closed
pavlot opened this issue Jul 20, 2020 · 2 comments
Closed

Relationships are not commited, but return no error #1

pavlot opened this issue Jul 20, 2020 · 2 comments

Comments

@pavlot
Copy link

pavlot commented Jul 20, 2020

This commented out code makes that relationships are not commited

# TODO do we need to commit the session here?

I suspect idea was done to allow postprocessors can rollback changes, but now it makes that relationship is not saved.

Also I think that tests should be improved to check not only return status, but try to reload relationship and check whether it exists. Now code return HTTP-204, but it do nothing

@mrevutskyi
Copy link
Owner

hi @pavlot,
thank you for the report. Sorry, haven't noticed it earlier.

Do you have a scenario I can reproduce the issue? Or what specific test you are referring to?
tests in test_updating_relationships.py do check db changes.
E.g.

assert response.status_code == 204 articles = sorted(person.articles, key=attrgetter('id')) assert [article1, article2] == articles

@mrevutskyi
Copy link
Owner

Closing the issue as I'm not able to reproduce, please reopen if you are still facing it

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

No branches or pull requests

2 participants