Skip to content

Commit

Permalink
fix object has no attribute 'get_schema_mapping' (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
keyn4 authored May 1, 2024
1 parent eab4c90 commit 4e64c65
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tap_pipedrive/tap.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
RecentNotesStream, RecentUsersStream, RecentActivitiesStream, RecentDealsStream,
RecentFilesStream, RecentOrganizationsStream, RecentPersonsStream, RecentProductsStream,
DealStageChangeStream, DealsProductsStream)

from tap_pipedrive.streams.recents.dynamic_typing import DynamicTypingRecentsStream

logger = singer.get_logger()

Expand Down Expand Up @@ -268,7 +268,12 @@ def do_paginate(self, stream, stream_metadata):
self.validate_response(response)
self.rate_throttling(response)
stream.paginate(response)
schema_mapping = stream.get_schema_mapping()

# only dynamic type streams have get_schema_mapping()
if isinstance(stream, DynamicTypingRecentsStream):
schema_mapping = stream.get_schema_mapping()
else:
schema_mapping = stream.get_schema()

# records with metrics
with singer.metrics.record_counter(stream.schema) as counter:
Expand Down

0 comments on commit 4e64c65

Please sign in to comment.