Commit 865ab73c authored by abuddenberg's avatar abuddenberg
Browse files

Added support for finsing missing organization ids to problem tool

parent dcb6f61e
......@@ -96,11 +96,17 @@ def sort_webform_list(report_id):
if not gcis.figure_exists(report_id, f.identifier):
problems.setdefault(key, {}).setdefault('figure_id_not_found', []).append(
(f.identifier, f.figure_num, f.title))
#Check if each image exists in GCIS
#Check if organizations have been proper identified
for cont in f.contributors:
if cont.identifier is None:
problems.setdefault(key, {}).setdefault('org_id_not_found', []).append(cont)
for image in f.images:
#Squirrel the image identifier away from later
global_image_ids.setdefault(image.identifier, []).append(key)
#Check if each image exists in GCIS
if not gcis.image_exists(image.identifier):
problems.setdefault(key, {}).setdefault('image_id_not_found', []).append(
image.identifier)
......@@ -116,6 +122,11 @@ def sort_webform_list(report_id):
problems.setdefault(key, {}).setdefault('missing_image_files', []).append(
image.identifier)
#Check if organizations have been proper identified
for cont in image.contributors:
if cont.identifier is None:
problems.setdefault(key, {}).setdefault('org_id_not_found', []).append(cont)
#Check for broken image associations
has_all_images, image_deltas = gcis.has_all_associated_images(report_id, f.identifier,
[i.identifier for i in f.images])
......
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