- if not level1_auth or level1_auth in ['']:
- level1_auth = None
-
- print "Import: creating top level authorities"
- if not level1_auth:
- sfaImporter.create_top_level_auth_records(root_auth)
- import_auth = root_auth
- else:
- if not AuthHierarchy.auth_exists(level1_auth):
- AuthHierarchy.create_auth(level1_auth)
- sfaImporter.create_top_level_auth_records(level1_auth)
- import_auth = level1_auth
+ # create root authority
+ sfaImporter.create_top_level_auth_records(root_auth)
+ if not root_auth == interface_hrn:
+ sfaImporter.create_top_level_auth_records(interface_hrn)