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

Hl 963 ps #2281

Merged
merged 3 commits into from
Sep 19, 2023
Merged

Hl 963 ps #2281

merged 3 commits into from
Sep 19, 2023

Conversation

rikuke
Copy link
Collaborator

@rikuke rikuke commented Sep 18, 2023

Description ✨

Submitting an application manually as a handler does not create rows into thebf_calculation_paysubsidytable in the database, because the JSON payload it submits has an empty pay_subsidies list evaluates to notNonewhich causes a branch in the calculation logic to skip the database insert. This PR fixes the issue by checking if the application is submitted by a handler and then makes sure that pay_subsidy_data is None and pay_subsidies is is not present in the validated_data dict.

Issues 🐛

Testing ⚗️

Pytest: pytest applications/tests/test_handler_application.py
Manually: create a new application as a handler and then as a handler process the application.

Screenshots 📸

Additional notes 🗒️

@rikuke rikuke requested review from sirtawast and mjturt September 18, 2023 15:11
@terovirtanen
Copy link
Contributor

API branch is deployed to platta: https://helsinkilisa-pr2281.api.dev.hel.ninja/healthz 🚀🚀🚀

@terovirtanen
Copy link
Contributor

HANDLER branch is deployed to platta: https://helsinkilisa-ui-handler-pr2281.dev.hel.ninja 🚀🚀🚀

@terovirtanen
Copy link
Contributor

APPLICANT branch is deployed to platta: https://helsinkilisa-ui-pr2281.dev.hel.ninja 🚀🚀🚀

@terovirtanen
Copy link
Contributor

TestCafe result is success for https://helsinkilisa-ui-pr2281.dev.hel.ninja 😆🎉🎉🎉

@terovirtanen
Copy link
Contributor

API branch is deployed to platta: https://helsinkilisa-pr2281.api.dev.hel.ninja/healthz 🚀🚀🚀

@terovirtanen
Copy link
Contributor

APPLICANT branch is deployed to platta: https://helsinkilisa-ui-pr2281.dev.hel.ninja 🚀🚀🚀

@terovirtanen
Copy link
Contributor

HANDLER branch is deployed to platta: https://helsinkilisa-ui-handler-pr2281.dev.hel.ninja 🚀🚀🚀

@terovirtanen
Copy link
Contributor

TestCafe result is success for https://helsinkilisa-ui-pr2281.dev.hel.ninja 😆🎉🎉🎉

@sonarqubecloud
Copy link

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

@sonarqubecloud
Copy link

[yjdh] 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 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@sonarqubecloud
Copy link

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

@sonarqubecloud
Copy link

[yjdh] 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 1 Code Smell

88.2% 88.2% Coverage
0.0% 0.0% Duplication

@terovirtanen
Copy link
Contributor

API branch is deployed to platta: https://helsinkilisa-pr2281.api.dev.hel.ninja/healthz 🚀🚀🚀

@terovirtanen
Copy link
Contributor

HANDLER branch is deployed to platta: https://helsinkilisa-ui-handler-pr2281.dev.hel.ninja 🚀🚀🚀

@terovirtanen
Copy link
Contributor

APPLICANT branch is deployed to platta: https://helsinkilisa-ui-pr2281.dev.hel.ninja 🚀🚀🚀

@terovirtanen
Copy link
Contributor

TestCafe result is success for https://helsinkilisa-ui-pr2281.dev.hel.ninja 😆🎉🎉🎉

@rikuke rikuke merged commit f7ceb74 into main Sep 19, 2023
53 checks passed
@rikuke rikuke deleted the HL-963-ps branch September 19, 2023 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants