ES-DOC / esdoc-questionnaire

ES-DOC Questionnaire (webform generator for creating CIM Documents). POC: @allynt
Other
2 stars 1 forks source link

If ontology registration fails, "is_registered" should not change. #444

Closed allynt closed 7 years ago

allynt commented 8 years ago

WHO: @allynt

The registration process is split into 2 fns: a wrapper fn and another registration fn specific to whether or not the ontology is CIM1 or CIM2 - the former calls the latter. If the specific fn fails for some reason, it adds an error message and returns immediately. This is good. However, the wrapper fn still continues by setting "is_registered" to True and doing some other behind-the-scenes stuff. This is bad.

allynt commented 8 years ago

The logic should be rewritten so that the specific registration fns are called w/in a try/catch block and execution of the wrapper fn is stopped if an exception is raised.

allynt commented 8 years ago

An explicit test that forces an error is needed.