Stop importing certain fields for HarvestUser cache table
since the Harvest API is suddenly no longer providing the values
This commit is contained in:
parent
782cb1fcec
commit
e239ea70e4
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue