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

Fix/98 loaddata with parentalmanytomany #118

Closed

Conversation

ababic
Copy link
Contributor

@ababic ababic commented Sep 1, 2019

Allows ParentalManyToMany fields values to be respected when using Django's loaddata management command.

I'm aware that these changes introduce the possibility of developers accidentally modifying the live database by setting the field value to something other than an iterable of objects. But, I cannot really see another way to make this work, as the parent object is not saved again after the manytomanyfield data is loaded. There does not seem to be a way to tell if the method is being called as a result of loaddata or direct manipulation either, so cannot see a way to make this behaviour conditional. I'm open to ideas on this though :)

gasman added a commit that referenced this pull request Jan 6, 2020
@gasman
Copy link
Contributor

gasman commented Jan 6, 2020

Thanks @ababic! Merged in 400c542 + parents.

@gasman gasman closed this Jan 6, 2020
@ababic ababic deleted the fix/98-loaddata-with-parentalmanytomany branch January 8, 2020 15:50
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.

None yet

2 participants