IndigoDomotics / indigo-pushover

Indigo plugin to send push notifications via Pushover.
MIT License
17 stars 11 forks source link

Validate that msgBody is not blank #19

Closed jcs closed 6 years ago

jcs commented 6 years ago

Also use .get instead of [] for optional fields to avoid KeyErrors like this post describes, though I'm still not sure why Indigo would be passing a dict without msgUser.

indigodomo commented 6 years ago

valuesDict always contains the keys for fields specified in a UI XML file. Text fields that are empty are returned as empty strings (vs None) since there are times when an empty string is what's intended rather than None (which is somewhat more restrictive). This is a relatively standard convention for Python-based UIs.