move-coop / parsons

A python library of connectors for the progressive community.
https://www.parsonsproject.org/
Other
257 stars 125 forks source link

Fix bug in NGPVAN apply_canvass_result method #927

Closed mkrausse-ggtx closed 7 months ago

mkrausse-ggtx commented 7 months ago

This pull request fixes a bug in the apply_canvass_result function. The problem was that the phone was only being sent when the contact_type_id was either 1 (phone) or 37 (SMS text) even though it was required for other contact types. Now it raises an error if the contact type requires phone. But, if the phone is provided, it sends it regardless of the contact type id.

mkrausse-ggtx commented 7 months ago

@shaunagm this addresses https://github.com/move-coop/parsons/issues/925. I think this is the best way to handle this bug.