Open imported-from-roundup opened 10 years ago
We're now on Django 1.5, so we can probably fix this now. Seems bitesize, so I'll add that label.
@ehashman I would like to work on this bug. So based on my communication with @shaunagm, what I understood is that - I need to find all references to signals.post_save and signals.pre_save in our code, verify that there are no table modifications in the methods where signals.post_save and signals.pre_save are called. In case there are any table modifications - I should pass raw=True as an argument wherever signals.post_save and signals.pre_save are called? Am I right?
Hi @ankitjavalkar! I saw your ping on IRC this morning so I just wanted to quickly get back to you here.
I would start with git grep
ping for all instances of signals.pre_save
and post_save
and checking how they are used. According to the docs linked above:
raw
A boolean;True
if the model is saved exactly as presented (i.e. when loading a fixture). One should not query/modify other records in the database as the database might not be in a consistent state yet.
so it seems to me that at least one table will always be modified when these methods are called; the concern is whether or not it should be affecting others (due to, perhaps, a FK relationship or something).
If you submit a PR I'll do my best to review it and give you feedback quickly.
Comment by walkerh:
See:
Comment by paulproteus:
It shows up in Django 1.4.
I guess we should upgrade to Django 1.4.
Status: chatting Nosy List: paulproteus, walkerh Priority: feature Imported from roundup ID: 717 (view archived page) Last modified: 2014-05-11.22:38:56