git://git.onelab.eu
/
plstackapi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
95c1e07
)
fix manyToMany error when creating deployment
author
Scott Baker
<smbaker@gmail.com>
Tue, 7 Oct 2014 00:17:40 +0000
(17:17 -0700)
committer
Scott Baker
<smbaker@gmail.com>
Tue, 7 Oct 2014 00:17:40 +0000
(17:17 -0700)
planetstack/core/admin.py
patch
|
blob
|
history
diff --git
a/planetstack/core/admin.py
b/planetstack/core/admin.py
index
11a2c59
..
a77be5b
100644
(file)
--- a/
planetstack/core/admin.py
+++ b/
planetstack/core/admin.py
@@
-527,10
+527,10
@@
class DeploymentAdminForm(forms.ModelForm):
def save(self, commit=True):
deployment = super(DeploymentAdminForm, self).save(commit=False)
- deployment.flavors = self.cleaned_data['flavors']
-
if commit:
deployment.save()
+ # this has to be done after save() if/when a deployment is first created
+ deployment.flavors = self.cleaned_data['flavors']
if deployment.pk:
# save_m2m() doesn't seem to work with 'through' relations. So we