]> git.ipfire.org Git - thirdparty/patchwork.git/commit
models: Resolve issues with Patch.state
authorStephen Finucane <stephen.finucane@intel.com>
Wed, 22 Jul 2015 08:34:58 +0000 (09:34 +0100)
committerStephen Finucane <stephen.finucane@intel.com>
Fri, 16 Oct 2015 22:20:08 +0000 (23:20 +0100)
commitd6e7b50b3f70f908d51feca596cd761545910972
tree9f46977400009fdb967501ee7f2fbe132b4810c2
parent634d97275f152470973996c242c9668bb53dff9f
models: Resolve issues with Patch.state

The initial migration introduced in '30bb271' was incomplete: running
'makemigrations' on the current codebase will produce a migration which
could not be applied cleanly. The reason for this was the non-loading
of initial data for the 'State' model.

Fix this issue by only referencing the contents of the 'State' model
when we have to (on save of a 'Patch' object), thus allowing the user
suitable time to apply this initial data.

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Acked-by: Damien Lespiau <damien.lespiau@intel.com>
patchwork/migrations/0001_initial.py
patchwork/migrations/0002_fix_patch_state_default_values.py [new file with mode: 0644]
patchwork/models.py