Renamed UserDeployment back to UserDeployments
diff --git a/planetstack/ec2_observer/deleters/user_deleter.py b/planetstack/ec2_observer/deleters/user_deleter.py
index 3f93060..3930eb0 100644
--- a/planetstack/ec2_observer/deleters/user_deleter.py
+++ b/planetstack/ec2_observer/deleters/user_deleter.py
@@ -1,13 +1,13 @@
-from core.models import User, UserDeployment
+from core.models import User, UserDeployments
from observer.deleter import Deleter
-from observer.deleters.user_deployment_deleter import UserDeploymentDeleter
+from observer.deleters.user_deployment_deleter import UserDeploymentsDeleter
class UserDeleter(Deleter):
model='User'
def call(self, pk):
user = User.objects.get(pk=pk)
- user_deployment_deleter = UserDeploymentDeleter()
- for user_deployment in UserDeployment.objects.filter(user=user):
+ user_deployment_deleter = UserDeploymentsDeleter()
+ for user_deployment in UserDeployments.objects.filter(user=user):
user_deployment_deleter(user_deployment.id)
user.delete()
diff --git a/planetstack/ec2_observer/deleters/user_deployment_deleter.py b/planetstack/ec2_observer/deleters/user_deployment_deleter.py
index 6d3825c..4bc7619 100644
--- a/planetstack/ec2_observer/deleters/user_deployment_deleter.py
+++ b/planetstack/ec2_observer/deleters/user_deployment_deleter.py
@@ -1,11 +1,11 @@
-from core.models import User, UserDeployment
+from core.models import User, UserDeployments
from observer.deleter import Deleter
-class UserDeploymentDeleter(Deleter):
- model='UserDeployment'
+class UserDeploymentsDeleter(Deleter):
+ model='UserDeployments'
def call(self, pk):
- user_deployment = UserDeployment.objects.get(pk=pk)
+ user_deployment = UserDeployments.objects.get(pk=pk)
if user_deployment.user.kuser_id:
driver = self.driver.admin_driver(deployment=user_deployment.deployment.name)
driver.delete_user(user_deployment.user.kuser_id)