dpinney / omf

The Open Modeling Framework for smart grid cost-benefit analysis.
https://omf.coop
GNU General Public License v2.0
112 stars 60 forks source link

Rerun fails after model stopped #356

Closed dpinney closed 9 years ago

dpinney commented 9 years ago

Steps to reproduce:

  1. Create a new solarSunda model.
  2. Give it a name and set the zip code to 99999.
  3. Run it. It will throw an invalid zip code error.
  4. Hit the re-run button. It will fail to re-run with the "same model name" error dialog.

Expected behavior: Allow user to re-run without checking the model name after crash or model stop.

dpinney commented 9 years ago

Confirmed Mannan's fix in production.

mannanj commented 9 years ago

Fixed in 6fc5d99883e5c3c4bfdc060f58fad616a04d45f7

The problem was with checking the model name at all instances of the model status being "stopped" (to represent creating a new model). This actually occurs during a model crash too; so the proper fix is to create a new status of "preRun" when the user is in creating a new model and check for this instead.