Skip to content

Commit e958690

Browse files
committed
make sure that firebase-to-postgres works when you don't pass any project id list #481
1 parent ca224cb commit e958690

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

mapswipe_workers/mapswipe_workers/mapswipe_workers.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,14 @@ def run_create_projects():
119119
)
120120
def run_firebase_to_postgres(project_ids: list) -> list:
121121
"""Update users and transfer results from Firebase to Postgres."""
122-
project_ids = transfer_results.transfer_results(project_ids)
123122

124123
if len(project_ids) > 0:
125-
for project_id in project_ids:
124+
project_ids_transferred = transfer_results.transfer_results(project_ids)
125+
else:
126+
project_ids_transferred = transfer_results.transfer_results()
127+
128+
if len(project_ids_transferred) > 0:
129+
for project_id in project_ids_transferred:
126130
update_data.set_progress_in_firebase(project_id)
127131
update_data.set_contributor_count_in_firebase(project_id)
128132
send_progress_notification(project_id)

0 commit comments

Comments
 (0)