The ContactsClient.get_batch() method was mutating the ContactsClient.default_batch_properties when adding in the extra_properties. This resulted in a situation where subsequent calls to ContactsClient.get_batch() would cause property=X to be repeated once for each time it had been included previously. This eventually leads to a bad request error from Hubspot once the URI gets too long.
This PR stops the ContactsClient.default_batch_properties mutation from happening, and uses a set instead of a list so that there won't be duplicate properties in the query string even if they appear in both extra_properties and ContactsClient.default_batch_properties.
The
ContactsClient.get_batch()
method was mutating theContactsClient.default_batch_properties
when adding in theextra_properties
. This resulted in a situation where subsequent calls toContactsClient.get_batch()
would causeproperty=X
to be repeated once for each time it had been included previously. This eventually leads to a bad request error from Hubspot once the URI gets too long.This PR stops the
ContactsClient.default_batch_properties
mutation from happening, and uses a set instead of a list so that there won't be duplicate properties in the query string even if they appear in bothextra_properties
andContactsClient.default_batch_properties
.