OpenTreeMap / otm-core

OpenTreeMap is a collaborative platform for crowdsourced tree inventory, ecosystem services calculations, urban forestry analysis, and community engagement.
www.opentreemap.org
Other
186 stars 88 forks source link

Update UDFDictionary so that setting key to None does not raise #3186

Closed jwalgran closed 7 years ago

jwalgran commented 7 years ago

The authorizable system sets field values to none if the logged in user is not permitted to see the field. In the case of UDFs, setting a field value to None when the key did not exist in the UDF dictionary was raising a KeyError. This commit avoids the error by checking for the existence of the key before trying to remove it.


Connects to #3183