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

feat: Complete invoice generation #7300

Merged
merged 5 commits into from
Sep 30, 2020
Merged

Conversation

iamareebjamal
Copy link
Member

@iamareebjamal iamareebjamal commented Sep 30, 2020

try:
save_to_db(event_invoice)
except Exception as e:
# For some reason, like duplicate identifier, the record might not be saved, so we

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.

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

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)

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:'

@auto-label auto-label bot added the feature label Sep 30, 2020
@lgtm-com
Copy link
Contributor

lgtm-com bot commented Sep 30, 2020

This pull request introduces 1 alert when merging 597b190 into c96ccf0 - view on LGTM.com

new alerts:

  • 1 for Unused import

@iamareebjamal iamareebjamal merged commit fad498f into development Sep 30, 2020
@iamareebjamal iamareebjamal deleted the invoice-generation branch September 30, 2020 14:28
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.

2 participants