Issue loading fixtures (again) #2652

Closed
yakky opened this Issue Feb 15, 2014 · 7 comments

Comments

Projects
None yet
2 participants
Contributor

yakky commented Feb 15, 2014

post_save_page is fired multiple times for each page during loaddata, but only the first time during page-from-fixture creation (thus having raw=True), the others being generated internally (raw=False), this causes instance.rescan_placeholders() to be fired which causes the 'usual' fixture loading problem.

@yakky yakky added this to the 3.0 milestone Feb 15, 2014

@yakky yakky added the blocker label Feb 15, 2014

Contributor

yakky commented Feb 15, 2014

We should probably scan sys.argv for loaddata in post_save_page.
@digi604 : as ugly as it seems, but cannot figure out any other strategy

Contributor

yakky commented Feb 15, 2014

How about signals.post_save.disconnect(post_save_page, sender=Page) in post_save_page to avoid that any operation in it will trigger multiple execution of itself?

Contributor

digi604 commented Feb 18, 2014

can you not mark a page somehow to not be processed multiple times?

Contributor

yakky commented Feb 18, 2014

Actually what's really blocking me it's a sane way to come up with a reliable test.
Anyway I'm trying different approaches.
I should be able to report by the end of the week

@yakky yakky self-assigned this Feb 22, 2014

Contributor

digi604 commented Feb 27, 2014

@yakky you got time for this next week?

Contributor

digi604 commented Feb 27, 2014

or this?

Contributor

yakky commented Feb 27, 2014

Next one, I swear :)
But I badly need to find a way to test this as I can't trigger the issue in the testsuite.
Last resort it's working with fixtures, but I'm trying hard to avoid this

@yakky yakky referenced this issue Feb 28, 2014

Merged

Fix loaddata #2769

@digi604 digi604 closed this Mar 1, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment