diff --git a/rattail_harvest/importing/harvest.py b/rattail_harvest/importing/harvest.py index 6fe466b..6153348 100644 --- a/rattail_harvest/importing/harvest.py +++ b/rattail_harvest/importing/harvest.py @@ -114,6 +114,17 @@ class HarvestUserImporter(FromHarvest, rattail_harvest_importing.model.HarvestUs data = super(HarvestUserImporter, self).normalize_host_object(user) if data: + # TODO: for some reason the API used to include the these + # fields, but no longer does as of 2022-11-11, so null is + # kinda the only thing that makes sense now. if possible, + # should figure out "what changed" at Harvest, but maybe + # these fields should just be removed from our cache + # schema? + data.setdefault('is_admin', None) + data.setdefault('is_project_manager', None) + data.setdefault('can_see_rates', None) + data.setdefault('can_create_invoices', None) + if data['telephone'] == '': data['telephone'] = None