From cbb6b73ab5b99847809e3f6e749495867653ba7f Mon Sep 17 00:00:00 2001 From: Scott Baker Date: Tue, 20 Jan 2015 17:12:43 -0800 Subject: [PATCH] fix sitesdeployments typo --- planetstack/core/admin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/planetstack/core/admin.py b/planetstack/core/admin.py index 1debeb0..9fba05c 100644 --- a/planetstack/core/admin.py +++ b/planetstack/core/admin.py @@ -542,7 +542,7 @@ class DeploymentAdminForm(forms.ModelForm): self.fields['accessControl'].initial = "allow site " + request.user.site.name if self.instance and self.instance.pk: - self.fields['sites'].initial = [x for x in self.instance.sitesdeployments.all()] + self.fields['sites'].initial = [x for x in self.instance.sitedeployments.all()] self.fields['images'].initial = [x.image for x in self.instance.imagedeployments.all()] self.fields['flavors'].initial = self.instance.flavors.all() @@ -594,7 +594,7 @@ class DeploymentAdminForm(forms.ModelForm): # create/destroy the through models ourselves. There has to be # a better way... - self.manipulate_m2m_objs(deployment, self.cleaned_data['sites'], deployment.sitedeployment.all(), SiteDeployment, "deployment", "site") + self.manipulate_m2m_objs(deployment, self.cleaned_data['sites'], deployment.sitedeployments.all(), SiteDeployment, "deployment", "site") self.manipulate_m2m_objs(deployment, self.cleaned_data['images'], deployment.imagedeployments.all(), ImageDeployments, "deployment", "image") # manipulate_m2m_objs doesn't work for Flavor/Deployment relationship # so well handle that manually here -- 2.43.0