Avoid importing Harvest times for which timer is still running

This commit is contained in:
Lance Edgar 2022-02-17 06:57:36 -06:00
parent ac653d25f1
commit e79686b5b7

View file

@ -223,6 +223,10 @@ class HarvestTimeEntryImporter(FromHarvest, rattail_harvest_importing.model.Harv
if not data: if not data:
return return
if entry['is_running']:
log.warning("Harvest time entry is still running: %s", entry)
return
data['user_id'] = entry['user']['id'] data['user_id'] = entry['user']['id']
data['client_id'] = entry['client']['id'] data['client_id'] = entry['client']['id']
data['task_id'] = entry['task']['id'] data['task_id'] = entry['task']['id']