Commit 82bdf74c authored by abuddenberg's avatar abuddenberg
Browse files

Added ability to skip processing certain questionable dataset identifiers....

Added ability to skip processing certain questionable dataset identifiers. Made debug output less noisy
parent 4d1186be
...@@ -23,13 +23,13 @@ def move_images_to_gcis(webform_client, gcis_client, webform_url, gcis_id, repor ...@@ -23,13 +23,13 @@ def move_images_to_gcis(webform_client, gcis_client, webform_url, gcis_id, repor
gcis_client.create_image(image, report_id=report_id, figure_id=figure.identifier) gcis_client.create_image(image, report_id=report_id, figure_id=figure.identifier)
def sync_dataset_metadata(gcis_client, datasets): def sync_dataset_metadata(gcis_client, datasets, skip=[]):
for ds in datasets: for ds in [ds for ds in datasets if ds.identifier not in skip]:
gcis_client.create_or_update_dataset(ds) gcis_client.create_or_update_dataset(ds)
gcis_client.create_or_update_activity(ds.activity) gcis_client.create_or_update_activity(ds.activity)
def populate_contributors(gcis_client, contributors): def realize_contributors(gcis_client, contributors):
for cont in contributors: for cont in contributors:
person = cont.person person = cont.person
org = cont.organization org = cont.organization
...@@ -43,8 +43,8 @@ def populate_contributors(gcis_client, contributors): ...@@ -43,8 +43,8 @@ def populate_contributors(gcis_client, contributors):
print '\t', 'Ambiguous results for ' + person.last_name print '\t', 'Ambiguous results for ' + person.last_name
print '\t\t', name_matches print '\t\t', name_matches
if org.identifier in (None, ''): if org.identifier in (None, '') and org.name not in (None, ''):
print org.name print 'No ID found for ' + org.name
# if org.name not in (None, ''): # if org.name not in (None, ''):
# org_matches = gcis_client.lookup_organization(org.name) # org_matches = gcis_client.lookup_organization(org.name)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment