-
Notifications
You must be signed in to change notification settings - Fork 32
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
Fix dynamic simulation button logic for file upload #670
Conversation
LGTM, I wonder how this got broken in the first place? |
@@ -70,7 +70,6 @@ def dropq_task(year, user_mods, first_budget_year, beh_params, tax_data): | |||
user_mods[reform_year].pop(key) | |||
user_reform = {"policy": user_mods} | |||
print('user_reform', user_reform, user_mods) | |||
reform_style = [True if x else False for x in user_reform] | |||
if beh_params: |
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.
reform_style
can only be [True]
since it is a dictionary with just one key policy
. Further, we now pass back assumptions data with empty dictionaries even if no assumptions are set. So, this method no longer detected whether the user specified assumptions or not.
reform_file_contents = reform_file_contents.replace(" "," ") | ||
assump_file_contents = model.json_text.assumption_text | ||
assump_file_contents = model.json_text.raw_assumption_text | ||
assump_file_contents = assump_file_contents.replace(" "," ") |
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.
After #641, all reforms have attribute assumption_text
as an assumption dictionary but the values are empty if they are not specified via an assumptions file or the dynamic behavior interface. So, raw_assumption_text
was used instead to distinguish file-upload reforms with an assumptions file from other reforms.
@brittainhard I had trouble pinning down the exact cause. But I found another bug once I dug further into the code. The It turned out that |
Closes #669