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

More than 50 blocks exception fix #22

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

More than 50 blocks exception fix #22

wants to merge 2 commits into from

Conversation

mareksmid
Copy link
Contributor

No description provided.

@mareksmid mareksmid requested a review from kuzmoyev December 16, 2021 19:39
@@ -73,6 +73,11 @@ def restaurant_meal_blocks(restaurant: Restaurant, meals: list, user_meals_pks:
] + [
SlackSender._meal_voting_block(m, (user_meals_pks is not None) and (m.pk not in user_meals_pks)) for m in meals
]
if len(blocks) > 50:
Copy link
Collaborator

Choose a reason for hiding this comment

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

This case actually seems like an error (as it was with Enterprise). Maybe we should fail fast on this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now showing an error message via Slack instead, is that better? Throwing an exception is not that visible...

@mareksmid mareksmid requested a review from kuzmoyev December 20, 2021 13:05
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