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

16408 - pay-api: Exception on /api/v1/accounts/9789/statements/2047079 #1173

Merged
merged 5 commits into from
May 19, 2023

Conversation

Jxio
Copy link
Collaborator

@Jxio Jxio commented May 17, 2023

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).

@Jxio Jxio requested review from seeker25 and kialj876 as code owners May 17, 2023 18:36
@Jxio Jxio added the bug Something isn't working label May 17, 2023
@Jxio Jxio self-assigned this May 17, 2023
@codecov
Copy link

codecov bot commented May 17, 2023

Codecov Report

Merging #1173 (305d05b) into main (28ff797) will increase coverage by 0.08%.
The diff coverage is 92.12%.

@@            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     
Flag Coverage Δ
eventlistenerqueue 81.81% <ø> (-0.48%) ⬇️
payadmin ∅ <ø> (?)
payapi 93.90% <92.03%> (+<0.01%) ⬆️
paymentjobs 80.22% <90.40%> (+1.26%) ⬆️
paymentreconciliationsqueue 91.74% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
jobs/payment-jobs/tasks/ejv_payment_task.py 96.46% <ø> (ø)
jobs/payment-jobs/tasks/routing_slip_task.py 89.09% <0.00%> (-0.43%) ⬇️
pay-api/src/pay_api/config.py 99.32% <ø> (-0.01%) ⬇️
pay-api/src/pay_api/services/fee_schedule.py 99.53% <ø> (-0.01%) ⬇️
jobs/payment-jobs/tasks/cfs_create_invoice_task.py 72.44% <50.00%> (-0.24%) ⬇️
pay-api/src/pay_api/services/bcol_service.py 86.00% <60.00%> (-2.24%) ⬇️
jobs/payment-jobs/tasks/statement_task.py 80.43% <79.66%> (+9.46%) ⬆️
pay-api/src/pay_api/resources/account.py 92.47% <80.00%> (-0.97%) ⬇️
pay-api/src/pay_api/models/payment.py 95.87% <83.33%> (-0.40%) ⬇️
...ay-api/src/pay_api/services/base_payment_system.py 95.94% <85.71%> (-0.56%) ⬇️
... and 57 more

... and 15 files with indirect coverage changes

@@ -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:
Copy link
Collaborator

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', [])
Copy link
Collaborator

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 []

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@seeker25 seeker25 merged commit 81b947f into bcgov:main May 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants