hpi-epic/BP2021

[Webserver] Refactor error handling for views in Webserver

Closed this issue · 0 comments

Try the following for any rl hyperparameter r:
insert a value into r, prefill with a config, that contains the r key, but a different value for r.
You would expect that the field turns red and an error is displayed. But this is not happening.
This "bug" is caused by webserver/alpha_business_app/views.py:agent_changed():get_agent_hyperparameter.
This does not consider the error values for the parameter.
Suggested refactoring:
make some hyperparameter fields unvisible
therefor:

  • insert logic into js, to add class d-none for some given keys
  • add the keys in the view
  • return the keys for the relevant hyperparameter
  • remove the current conversion to other dict get_rl_parameter_prefill
  • write the view file for rl hyperparameter in on_recommerce_change.py
  • write sim market hyperparameter in on_recommerce_change.py