- table = GeniTable()
- auth_record = GeniRecord(hrn=hrn, gid=auth_info.get_gid_object(), type="authority", pointer=site['site_id'])
- try:
+ table = SfaTable()
+ auth_record = SfaRecord(hrn=hrn, gid=auth_info.get_gid_object(), type="authority", pointer=site['site_id'])
+ auth_record['authority'] = get_authority(auth_record['hrn'])
+ existing_records = table.find({'hrn': hrn, 'type': 'authority', 'pointer': site['site_id']})
+ if not existing_records: