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

Versioning of previously unversioned model with FK doesn't work #61

Open
philipn opened this issue Jan 26, 2015 · 1 comment
Open

Versioning of previously unversioned model with FK doesn't work #61

philipn opened this issue Jan 26, 2015 · 1 comment

Comments

@philipn
Copy link
Member

philipn commented Jan 26, 2015

From @mivanov on October 31, 2012 21:48

Right now versioning with FK's only works for objects created after versioning was enabled. If there are objects that were created before versioning was enabled (i.e. they have no history), when creating a historical record for a model that has the FK, their historical id will not be found , and the FK will be set to None, which may not be allowed.

Propose adding a management command or hook into syncdb to create a historical record for all versioned objects that don't have one yet (or just the ones that just started to be versioned). Either that or fixing the handling of FK's to avoid this issue.

Minor thing, but stumped me for a few.

Copied from original issue: localwiki/localwiki#369

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

No branches or pull requests

1 participant