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

Allocation logic fix #97

Merged
merged 7 commits into from
Nov 16, 2024
Merged

Allocation logic fix #97

merged 7 commits into from
Nov 16, 2024

Conversation

Princekumarofficial
Copy link
Collaborator

No description provided.

home/views.py Fixed Show fixed Hide fixed
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
home/views.py Dismissed Show dismissed Hide dismissed
]
caterer_prefs = [Caterer.objects.get(name=pref) for pref in caterer_prefs if pref]

caterer = next((c for c in caterer_prefs if c.student_limit > Allocation.objects.filter(caterer=c, period=period_obj).count()), None)
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we rewrite this to make it clear what we intend to do. Right now unreadable.

Copy link
Collaborator

Choose a reason for hiding this comment

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

tr breaking it into 2-3 lines

@Princekumarofficial Princekumarofficial merged commit 4fa2324 into main Nov 16, 2024
3 checks passed
@mittal-ishaan mittal-ishaan deleted the allocation-logic-fix branch November 17, 2024 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants