update importers
diff --git a/plstackapi/importer/plclassic/role_importer.py b/plstackapi/importer/plclassic/role_importer.py
index 7404ce3..107587a 100644
--- a/plstackapi/importer/plclassic/role_importer.py
+++ b/plstackapi/importer/plclassic/role_importer.py
@@ -1,21 +1,9 @@
-from PLC.Roles import Roles
-from model import Role
-
class RoleImporter:
- def __init__(self, importer):
- self.importer = importer
- self.roles = {}
+ def __init__(self, api):
+ self.api = api
def run(self):
- roles = self.importer.api.GetRoles()
- db_roles = Role.objects.all()
- db_roles_list = [db_role['name'] for db_role in db_roles]
- for role in roles:
- if role['name'] not in db_roles_list:
- new_role = Role(name=role['name'])
- new_role.save()
- self.roles[role['role_id']] = role
-
+ return