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

Refactor submit_reform for quick-calc submission case #655

Merged
merged 7 commits into from
Sep 26, 2017

Conversation

hdoupe
Copy link
Collaborator

@hdoupe hdoupe commented Sep 20, 2017

Closes #654

@hdoupe
Copy link
Collaborator Author

hdoupe commented Sep 22, 2017

@brittainhard PR #655 is ready for review.

@brittainhard
Copy link
Contributor

This is working. @hdoupe why the large refactoring job. What does the save_model function do that submit_reform wasn't?

@hdoupe
Copy link
Collaborator Author

hdoupe commented Sep 25, 2017

@brittainhard submit_micro was using the process_model function which was replaced with submit_reform. But submit_reform starts with a request object and not a TaxSaveInputs object. It seemed easier to refactor the submit_reform function than use a request object as an input to submit_reform some of the time and a TaxSaveInputs object the other times. Does that make sense?

@@ -602,9 +632,49 @@ def submit_micro(request, pk):
model.tax_result = None

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The data is already parsed into a TaxSaveInputs object so that means that there is no need to go through the request parsing logic in submit_reform.

@brittainhard
Copy link
Contributor

@hdoupe need to fix these merge conflicts.

@hdoupe
Copy link
Collaborator Author

hdoupe commented Sep 26, 2017

@brittainhard Sorry about that. I should have checked this earlier. I'll run this locally and make sure it works.

@hdoupe
Copy link
Collaborator Author

hdoupe commented Sep 26, 2017

@brittainhard Just ran it locally. I submitted a quick-calc and a full calculation from there and everything looks good.

@brittainhard
Copy link
Contributor

LGTM, merging.

@brittainhard brittainhard merged commit 7911fa7 into ospc-org:master Sep 26, 2017
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.

2 participants