-
Notifications
You must be signed in to change notification settings - Fork 40
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
16408 - pay-api: Exception on /api/v1/accounts/9789/statements/2047079 #1173
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1173 +/- ##
==========================================
+ Coverage 91.54% 91.63% +0.08%
==========================================
Files 153 163 +10
Lines 9842 11064 +1222
==========================================
+ Hits 9010 10138 +1128
- Misses 832 926 +94
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@@ -257,6 +257,8 @@ def search_purchase_history(cls, # noqa:E501; pylint:disable=too-many-arguments | |||
if count > 60000: | |||
raise BusinessException(Error.PAYMENT_SEARCH_TOO_MANY_RECORDS) | |||
result = query.all() | |||
if result is 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.
Don't need this, query.all() always returns an array
@@ -103,8 +103,9 @@ def create_invoice(cls, payment_request: Tuple[Dict[str, Any]], authorization: T | |||
invoice.business_identifier = business_identifier | |||
invoice.payment_method_code = pay_service.get_payment_method_code() | |||
invoice.corp_type_code = corp_type | |||
details = payment_request.get('details', []) |
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.
My fault here, didn't realize payment_request.get('details',[]) returns None, figured it would return a value for details or []
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Issue #:
bcgov/entity#16408
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the sbc-pay license (Apache 2.0).