-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: no extra checks fix #439
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🌍
if extra_checks_count: | ||
passed_extra_checks_submission_ids = ExtraCheckResult.objects.filter( | ||
submission__group__project=instance, | ||
submission__is_valid=True, | ||
result=StateEnum.SUCCESS | ||
).values_list('submission__id', flat=True) | ||
|
||
passed_extra_checks_group_ids = Submission.objects.filter( | ||
id__in=passed_extra_checks_submission_ids | ||
).values_list('group_id', flat=True) | ||
|
||
unique_groups = set(passed_extra_checks_group_ids) | ||
extra_checks_passed = len(unique_groups) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you're bored, I'm fairly certain this can be optimized as in terms of the amount of db calls.
However I'm good to leave it like that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🌏
closes #438
Perhaps if I have enough time left I will also make the ProjectMeter only show the checks which are actually relevant for the corresponding project.