fix bugs
diff --git a/plstackapi/core/models.py b/plstackapi/core/models.py
index 88e85cf..7bb94d6 100644
--- a/plstackapi/core/models.py
+++ b/plstackapi/core/models.py
@@ -31,7 +31,7 @@
tenant = driver.create_tenant(tenant_name=self.login_base,
description=self.name,
enabled=self.enabled)
- self.tenant_id = tenants.id
+ self.tenant_id = tenant.id
else:
# update record
self.driver.update_tenant(self.tenant_id, name=self.login_base,
@@ -64,7 +64,7 @@
tenant = driver.create_tenant(tenant_name=self.name,
description=self.description,
enabled=self.enabled)
- self.tenant_id = tenants.id
+ self.tenant_id = tenant.id
else:
# update record
self.driver.update_tenant(self.tenant_id, name=self.name,
diff --git a/plstackapi/importer/plclassic/site_importer.py b/plstackapi/importer/plclassic/site_importer.py
index d513fb6..56a60db 100644
--- a/plstackapi/importer/plclassic/site_importer.py
+++ b/plstackapi/importer/plclassic/site_importer.py
@@ -20,6 +20,7 @@
self.remote_sites[site['site_id']] = site
if site['login_base'] not in self.local_sites:
new_site = Site(name=site['name'],
+ login_base=site['login_base'],
site_url=site['url'],
enabled=site['enabled'],
longitude=site['longitude'],