ES-DOC / esdoc-questionnaire

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

Registration fails if multiple proxies use the same cim_id #540

Closed allynt closed 7 years ago

allynt commented 7 years ago

Registration fails if multiple proxies use the same cim_id.

allynt commented 7 years ago

This is to be expected, "cim_id" is derived from the "specialization_id" but it would be better to never get in this situation in the first place.

Forcing the "cim_id" field to be unique isn't enough, b/c loads of proxies don't (and shouldn't) have a cim_id, internally the db stores this as a blank string and two empty strings are not unique.

I can get around this, though, by overloading the save method and replacing any blank strings with "None" which is ignored in the uniqueness check.