Let Harvest API -> Harvest cache importer fetch single host object
for one-off imports via web app
This commit is contained in:
parent
e58d843ee4
commit
509405cb34
|
@ -233,6 +233,11 @@ class HarvestTimeEntryImporter(FromHarvest, rattail_harvest_importing.model.Harv
|
|||
kw['to'] = self.end_date
|
||||
return self.webapi.get_time_entries(**kw)
|
||||
|
||||
def get_single_host_object(self, key):
|
||||
assert len(self.key) == 1 and self.key[0] == 'id'
|
||||
entry_id = key[0]
|
||||
return self.webapi.get_time_entry(entry_id)
|
||||
|
||||
def normalize_host_object(self, entry):
|
||||
data = super(HarvestTimeEntryImporter, self).normalize_host_object(entry)
|
||||
if not data:
|
||||
|
|
Loading…
Reference in a new issue