-
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: New Create Order API #7047
feat: New Create Order API #7047
Conversation
user = UserFactory() | ||
db.session.commit() | ||
|
||
return {'Authorization': "JWT " + create_access_token(user.id, fresh=True)} |
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.
Black would make changes.
from flask_jwt_extended.utils import create_access_token | ||
from app.models.ticket_holder import TicketHolder | ||
from tests.factories.event import EventFactoryBasic | ||
from tests.factories.order import OrderFactory, OrderSubFactory |
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.
'tests.factories.order.OrderFactory' imported but unused
db.session.refresh(order) | ||
order_schema = OrderSchema() | ||
return order_schema.dump(order) | ||
event = tickets[0].event |
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.
local variable 'event' is assigned to but never used
app/api/custom/orders.py
Outdated
@@ -1,3 +1,4 @@ | |||
import json |
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.
'json' imported but unused
Codecov Report
@@ Coverage Diff @@
## development #7047 +/- ##
===============================================
+ Coverage 60.60% 61.16% +0.56%
===============================================
Files 260 260
Lines 12886 12882 -4
===============================================
+ Hits 7809 7879 +70
+ Misses 5077 5003 -74
Continue to review full report at Codecov.
|
This pull request introduces 5 alerts when merging db012a4 into 3ccc441 - view on LGTM.com new alerts:
|
app/api/custom/orders.py
Outdated
from datetime import datetime | ||
|
||
import pytz | ||
from flask import Blueprint, jsonify, make_response, request | ||
from flask import Blueprint, app, jsonify, make_response, request |
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.
'flask.app' imported but unused
This pull request introduces 5 alerts when merging b57ac77 into 3ccc441 - view on LGTM.com new alerts:
|
This pull request introduces 3 alerts when merging 85010f3 into 24fd032 - view on LGTM.com new alerts:
|
Here is an overview of what got changed by this pull request: Complexity increasing per file
==============================
- tests/all/integration/api/helpers/order/test_create_order.py 7
Clones added
============
- tests/all/integration/api/helpers/order/test_create_order.py 2
Clones removed
==============
+ app/api/orders.py -2
See the complete overview on Codacy |
Fixes #6569
Fix for #6302