bug fixes
diff --git a/planetstack/openstack/driver.py b/planetstack/openstack/driver.py
index f448e40..53b8e3f 100644
--- a/planetstack/openstack/driver.py
+++ b/planetstack/openstack/driver.py
@@ -43,7 +43,8 @@
return driver
def admin_driver(self, tenant=None, controller=None):
- controller = Controller.objects.get(id=controller.id)
+ if isinstance(controller, int):
+ controller = Controller.objects.get(id=controller.id)
client = OpenStackClient(tenant=tenant, controller=controller)
driver = OpenStackDriver(client=client)
driver.admin_user = client.keystone.users.find(name=controller.admin_user)