endpoints/api: Allow null fields in user metadata

The user metadata fields are nullable in the database, but were not in
the json sechema.  This prevented users from updating some of their
information on the site if they hadn't set the metadata fields.
This commit is contained in:
Brad Ison 2018-06-26 16:07:59 -04:00
parent f32bbf1fdc
commit 73cb7f3228
No known key found for this signature in database
GPG key ID: 972D14B0BE6DE287
6 changed files with 71 additions and 27 deletions

View file

@ -97,7 +97,7 @@ class _MarketoAnalyticsClient(object):
lookupField='id',
)
def change_metadata(self, email, given_name, family_name, company, location):
def change_metadata(self, email, given_name=None, family_name=None, company=None, location=None):
lead_data = self._get_lead_metadata(given_name, family_name, company, location)
if not lead_data:
return