Skip to content
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

Merged
merged 4 commits into from
May 21, 2024
Merged

chore: no extra checks fix #439

merged 4 commits into from
May 21, 2024

Conversation

francisvaut
Copy link
Contributor

@francisvaut francisvaut commented May 20, 2024

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.

@francisvaut francisvaut added this to the Final milestone milestone May 20, 2024
@francisvaut francisvaut self-assigned this May 20, 2024
@francisvaut francisvaut requested a review from Topvennie May 21, 2024 11:35
Copy link
Contributor

@Topvennie Topvennie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🌍

Comment on lines +39 to +51
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)
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🌏

@francisvaut francisvaut merged commit 5dff24e into development May 21, 2024
3 checks passed
@francisvaut francisvaut deleted the status-fix branch May 21, 2024 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No extra checks fix
2 participants