File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -76,10 +76,12 @@ 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
- and res_dict .get ('validation_status' , None ) != 'success' :
81
- # validation.enforce_schema is turned on, and there is no successful report.
82
- return True
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
83
85
84
86
elif res_dict .get ('schema' , None ) and res_dict .get ('validation_status' , None ) != 'success' :
85
87
# validation.enforce_schema is turned off, and there is a Validation Schema and no successful report.
You can’t perform that action at this time.
0 commit comments