-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
feat: Complete invoice generation #7300
Conversation
try: | ||
save_to_db(event_invoice) | ||
except Exception as e: | ||
# For some reason, like duplicate identifier, the record might not be saved, so we |
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.
line too long (102 > 90 characters)
event = Event.query.get(event_id) | ||
try: | ||
# For keeping invoice numbers gapless and non-repeating, we need to generate invoices | ||
# one at a time. Hence, we try acquiring an expiring lock for 20 seconds, and then retry. |
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.
line too long (97 > 90 characters)
|
||
event = Event.query.get(event_id) | ||
try: | ||
# For keeping invoice numbers gapless and non-repeating, we need to generate invoices |
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.
line too long (93 > 90 characters)
# SQLAlchemy returns touples instead of list of IDs | ||
last_order_event_ids = [r[0] for r in last_order_event_ids] | ||
events = ( | ||
Event.query.filter(Event.owner != None) |
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.
comparison to None should be 'if cond is not None:'
This pull request introduces 1 alert when merging 597b190 into c96ccf0 - view on LGTM.com new alerts:
|
For fossasia/open-event-frontend#5127