Update load_csv_to_staging.py

Updates to bring staging script into line with main upload script
- Script was not working
This commit is contained in:
dominic 2020-02-27 12:04:09 +00:00 committed by GitHub
parent eccf0f5b04
commit bdd3462e99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -61,6 +61,11 @@ def update_building(building_id, data, api_key, base_url):
def find_building(data, base_url):
if 'building_id' in data:
building_id = data['building_id']
if building_id is not None:
print("match_by_building_id", building_id)
return building_id
if 'toid' in data:
building_id = find_by_reference(base_url, 'toid', data['toid'])
if building_id is not None: