Renamed UserDeployments->UserDeployment
diff --git a/planetstack/core/models/site.py b/planetstack/core/models/site.py
index 9ef48c2..f562b92 100644
--- a/planetstack/core/models/site.py
+++ b/planetstack/core/models/site.py
@@ -255,12 +255,12 @@
qs = DeploymentPrivilege.objects.filter(id__in=dpriv_ids)
return qs
-class SiteDeployments(PlCoreBase):
+class SiteDeployment(PlCoreBase):
objects = DeploymentLinkManager()
deleted_objects = DeploymentLinkDeletionManager()
- site = models.ForeignKey(Site)
- deployment = models.ForeignKey(Deployment)
+ site = models.ForeignKey(Site,related_name='sitedeployments')
+ deployment = models.ForeignKey(Deployment,related_name='sitedeployments')
tenant_id = models.CharField(null=True, blank=True, max_length=200, help_text="Keystone tenant id")
#class Meta:
diff --git a/planetstack/core/models/userdeployments.py b/planetstack/core/models/userdeployments.py
index 5685668..6cc2643 100644
--- a/planetstack/core/models/userdeployments.py
+++ b/planetstack/core/models/userdeployments.py
@@ -19,7 +19,7 @@
@staticmethod
def select_by_user(user):
if user.is_admin:
- qs = UserDeployments.objects.all()
+ qs = UserDeployment.objects.all()
else:
users = Users.select_by_user(user)
qs = Usereployments.objects.filter(user__in=slices)