Spaces:
Sleeping
Sleeping
qqubb
commited on
Commit
·
956fd2d
1
Parent(s):
eae9bf6
improve message with reference to card label
Browse files- compliance_analysis.py +3 -3
compliance_analysis.py
CHANGED
@@ -281,14 +281,14 @@ def check_intended_purpose(dispositive_variables, project_cc, other_cc):
|
|
281 |
# For each Data CC, put the intended uses in a set and then make sure the Project's intended use is in the set
|
282 |
|
283 |
if other_cc['card_details']['card_type'] == 'data':
|
284 |
-
data_cc = other_cc
|
285 |
for key in data_cc['intended_purpose']:
|
286 |
if data_cc['intended_purpose'][f'{key}']['value']:
|
287 |
dataset_intended_purposes.append(key)
|
288 |
|
289 |
for purpose in project_intended_purposes:
|
290 |
if purpose not in dataset_intended_purposes:
|
291 |
-
dispositive_variables['msg'].append(f"You are not compliant because {purpose} is not a valid purpose for
|
292 |
|
293 |
# Now do the exact same thing for all models
|
294 |
|
@@ -300,7 +300,7 @@ def check_intended_purpose(dispositive_variables, project_cc, other_cc):
|
|
300 |
|
301 |
for purpose in project_intended_purposes:
|
302 |
if purpose not in model_intended_purposes:
|
303 |
-
dispositive_variables['msg'].append(f"You are not compliant because {purpose} is not a valid purpose for
|
304 |
|
305 |
dispositive_variables['project_intended_purposes'] = project_intended_purposes
|
306 |
|
|
|
281 |
# For each Data CC, put the intended uses in a set and then make sure the Project's intended use is in the set
|
282 |
|
283 |
if other_cc['card_details']['card_type'] == 'data':
|
284 |
+
data_cc = other_cc
|
285 |
for key in data_cc['intended_purpose']:
|
286 |
if data_cc['intended_purpose'][f'{key}']['value']:
|
287 |
dataset_intended_purposes.append(key)
|
288 |
|
289 |
for purpose in project_intended_purposes:
|
290 |
if purpose not in dataset_intended_purposes:
|
291 |
+
dispositive_variables['msg'].append(f"You are not compliant because {purpose} is not a valid purpose for {data_cc['card_details']['card_label']}")
|
292 |
|
293 |
# Now do the exact same thing for all models
|
294 |
|
|
|
300 |
|
301 |
for purpose in project_intended_purposes:
|
302 |
if purpose not in model_intended_purposes:
|
303 |
+
dispositive_variables['msg'].append(f"You are not compliant because {purpose} is not a valid purpose for {model_cc['card_details']['card_label']}")
|
304 |
|
305 |
dispositive_variables['project_intended_purposes'] = project_intended_purposes
|
306 |
|