Closed MichaelShohat closed 5 years ago
@MichaelShohat
In order to use a new field, you need to make the following changes:
SimulationForm2_SimulationParameters
).SimulationWizard
:
done
: Adds the field as a parameter to the instance of the Simulation class.clean_form_dict
: Adds the following two lines:
production_steps = dict_.get('production_steps', '')
clean_dict['production_steps'] = production_steps
get_form_initial
: Adds the field to the dictionary step_2_prev_data
:
'production_steps': step_2_prev_data.get('2-production_steps')}
__init__
: Adds the field to the parameter list and adds the following line:
self.production_steps = float(production_steps)
.create_simulation
: Use the new field.This pull request introduces 2 alerts when merging 9dbbdd22a009332303f7583937abeb1d674dcdbb into d625d72d531bb2d687b2f40cf11099cf2fa4781d - view on LGTM.com
new alerts:
Comment posted by LGTM.com
Do not merge this yet
This pull request introduces 2 alerts and fixes 2 when merging 5d7251e1890ca0494e78405887d96485d5b4e4ed into d625d72d531bb2d687b2f40cf11099cf2fa4781d - view on LGTM.com
new alerts:
fixed alerts:
Comment posted by LGTM.com
Tried adding field production_steps - #79 received error after adding it to simulation_main_script - tuple has no attribute create_simulation.