Skip to content

Commit

Permalink
Revert Organizations to the Incremental Search endpoint (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
luandy64 authored Sep 16, 2021
1 parent a26eb4d commit ab9936f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tap_zendesk/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,10 @@ def _add_custom_fields(self, schema):

def sync(self, state):
bookmark = self.get_bookmark(state)
organizations = self.get_objects()
organizations = self.client.organizations.incremental(start_time=bookmark)
for organization in organizations:
if utils.strptime_with_tz(organization['updated_at']) >= bookmark:
self.update_bookmark(state, organization['updated_at'])
yield (self.stream, organization)
self.update_bookmark(state, organization.updated_at)
yield (self.stream, organization)


class Users(Stream):
Expand Down

0 comments on commit ab9936f

Please sign in to comment.