You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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
The text was updated successfully, but these errors were encountered: