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
(parent:
cfb7152
)
fix bug that caused flavors to be permanently deleted
author
Tony Mack
<tmack@tux.cs.princeton.edu>
Mon, 15 Dec 2014 17:37:59 +0000
(12:37 -0500)
committer
Tony Mack
<tmack@tux.cs.princeton.edu>
Mon, 15 Dec 2014 17:37:59 +0000
(12:37 -0500)
planetstack/core/admin.py
patch
|
blob
|
history
diff --git
a/planetstack/core/admin.py
b/planetstack/core/admin.py
index
7fa537a
..
be75f75
100644
(file)
--- a/
planetstack/core/admin.py
+++ b/
planetstack/core/admin.py
@@
-609,7
+609,7
@@
class DeploymentAdminForm(forms.ModelForm):
# so well handle that manually here
for flavor in deployment.flavors.all():
if getattr(flavor, 'name') not in self.cleaned_data['flavors']:
-
flavor.delete(
)
+
deployment.flavors.remove(flavor
)
for flavor in self.cleaned_data['flavors']:
if flavor not in deployment.flavors.all():
flavor.deployments.add(deployment)