Skip to content

Commit

Permalink
use get function
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle Allan committed Jan 3, 2018
1 parent 1e990a7 commit 9d05811
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tap_salesforce/salesforce/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ def _get_selected_properties(self, catalog_entry):
or metadata.get(mdata, ('properties', k), 'inclusion') == 'automatic']

def get_start_date(self, state, catalog_entry):
replication_key = catalog_entry['replication_key']
replication_key = catalog_entry.get('replication_key')

return (singer.get_bookmark(state,
catalog_entry['tap_stream_id'],
Expand All @@ -338,7 +338,7 @@ def _build_query_string(self, catalog_entry, start_date, end_date=None, order_by

query = "SELECT {} FROM {}".format(",".join(selected_properties), catalog_entry['stream'])

replication_key = catalog_entry['replication_key']
replication_key = catalog_entry.get('replication_key')

if replication_key:
where_clause = " WHERE {} >= {} ".format(
Expand Down

0 comments on commit 9d05811

Please sign in to comment.