fix openstack integration
diff --git a/planetstack/core/models/role.py b/planetstack/core/models/role.py
index d3c577d..f6c2f2c 100644
--- a/planetstack/core/models/role.py
+++ b/planetstack/core/models/role.py
@@ -2,7 +2,6 @@
import datetime
from django.db import models
from core.models import PlCoreBase
-from openstack.manager import OpenStackManager
class Role(PlCoreBase):
@@ -15,13 +14,15 @@
def save(self, *args, **kwds):
if not hasattr(self, 'os_manager'):
+ from openstack.manager import OpenStackManager
setattr(self, 'os_manager', OpenStackManager())
- self.os_manager.save_role(self)
+ self.os_manager.save_role(self)
super(Role, self).save(*args, **kwds)
def delete(self, *args, **kwds):
if not hasattr(self, 'os_manager'):
+ from openstack.manager import OpenStackManager
setattr(self, 'os_manager', OpenStackManager())
- self.os_manager.delete_role(self)
+ self.os_manager.delete_role(self)
super(Role, self).delete(*args, **kwds)