Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Andrew Buddenberg
gcis-py-client
Commits
865ab73c
Commit
865ab73c
authored
Apr 16, 2014
by
abuddenberg
Browse files
Added support for finsing missing organization ids to problem tool
parent
dcb6f61e
Changes
1
Hide whitespace changes
Inline
Side-by-side
bin/problems
View file @
865ab73c
...
...
@@ -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
])
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment