raise PermissionDenied if someone tries to save an object without can_update rights
[plstackapi.git] / planetstack / core / models / site.py
index df42edd..160b426 100644 (file)
@@ -84,7 +84,7 @@ class DeploymentManager(PlCoreBaseManager):
         if backend_type:
             return parent_queryset.filter(Q(backend_type=backend_type)|Q(backend_type=None))
         else:
-            return parent_queryset.filter(Q(backend_type=backend_type)|Q(backend_type=None))
+            return parent_queryset
 
     # deprecated in django 1.7 in favor of get_queryset().
     def get_query_set(self):
@@ -174,6 +174,7 @@ class Deployment(PlCoreBase):
     admin_tenant = models.CharField(max_length=200, null=True, blank=True, help_text="Name of the tenant the admin user belongs to")\r
     auth_url = models.CharField(max_length=200, null=True, blank=True, help_text="Auth url for the deployment")
     backend_type = models.CharField(max_length=200, null=True, blank=True, help_text="Type of deployment, e.g. EC2, OpenStack, or OpenStack version")
+    availability_zone = models.CharField(max_length=200, null=True, blank=True, help_text="OpenStack availability zone")
 
     # smbaker: the default of 'allow all' is intended for evolutions of existing
     #    deployments. When new deployments are created via the GUI, they are