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>