fix: one iterable for any, all (#15)
Browse files- fix: one iterable for any, all (761f62c98333e78c2c4444080642f2c905f8ad28)
app.py
CHANGED
|
@@ -74,10 +74,10 @@ def check_if_passed(hf_username):
|
|
| 74 |
|
| 75 |
# If the user contributed to models, datasets and spaces then assign excellence
|
| 76 |
has_models, has_datasets, has_spaces = get_hub_footprint(hf_username, ORGANIZATION)
|
| 77 |
-
if all(has_models, has_datasets, has_spaces):
|
| 78 |
passed = True
|
| 79 |
certificate_type = "excellence"
|
| 80 |
-
elif any(has_models, has_datasets, has_spaces):
|
| 81 |
passed = True
|
| 82 |
certificate_type = "completion"
|
| 83 |
|
|
|
|
| 74 |
|
| 75 |
# If the user contributed to models, datasets and spaces then assign excellence
|
| 76 |
has_models, has_datasets, has_spaces = get_hub_footprint(hf_username, ORGANIZATION)
|
| 77 |
+
if all((has_models, has_datasets, has_spaces)):
|
| 78 |
passed = True
|
| 79 |
certificate_type = "excellence"
|
| 80 |
+
elif any((has_models, has_datasets, has_spaces)):
|
| 81 |
passed = True
|
| 82 |
certificate_type = "completion"
|
| 83 |
|