File tree 1 file changed +4
-8
lines changed
1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -76,15 +76,11 @@ def awaiting_validation(res_dict):
76
76
log .warning ('ckanext.xloader.validation.requires_successful_report requires the ckanext-validation plugin to be activated.' )
77
77
return False
78
78
79
- if p .toolkit .asbool (config .get ('ckanext.xloader.validation.enforce_schema' , True )):
80
- # validation.enforce_schema is turned on, explicitly check for the `validation_status`
81
- if res_dict .get ('validation_status' , None ) != 'success' :
82
- return True
83
- else :
84
- return False
79
+ if (p .toolkit .asbool (config .get ('ckanext.xloader.validation.enforce_schema' , True ))
80
+ or res_dict .get ('schema' , None )) and res_dict .get ('validation_status' , None ) != 'success' :
85
81
86
- elif res_dict . get ( 'schema' , None ) and res_dict . get ( 'validation_status' , None ) != 'success' :
87
- # validation.enforce_schema is turned off, and there is a Validation Schema and no successful report.
82
+ # either validation.enforce_schema is turned on or it is off and there is not schema to enfroce,
83
+ # we then explicitly check for the `validation_status` report to be `success``
88
84
return True
89
85
90
86
# at this point, we can assume that the Resource is not waiting for Validation.
You can’t perform that action at this time.
0 commit comments