Skip to content

Commit

Permalink
fix: TypeError for live db query with skip_records
Browse files Browse the repository at this point in the history
  • Loading branch information
Sieboldianus committed Feb 3, 2020
1 parent 371e35d commit b0216a4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lbsntransform/input/load_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def __init__(
self.is_local_input = is_local_input
self.start_number = 1
self.continue_number = None
self.skip_until_record = None
if not self.is_local_input:
# Start Value, Modify to continue from last processing
self.continue_number = startwith_db_rownumber
Expand All @@ -61,8 +62,7 @@ def __init__(
self.continue_number = 0
if skip_until_file is not None:
self.continue_number = skip_until_file
if skip_until_record is not None:
self.start_number = skip_until_record
self.skip_until_record = skip_until_record
self.source_web = source_web
if zip_records is None:
zip_records = False
Expand Down Expand Up @@ -283,7 +283,7 @@ def convert_records(
for record in records:
self.count_glob += 1
# skip records based on count
if self.start_number > self.count_glob:
if self.skip_until_record and self.skip_until_record > self.count_glob:
print(f'Skipping record {self.count_glob}', end='\r')
continue
record_type = None
Expand Down

0 comments on commit b0216a4

Please sign in to comment.