File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
mapswipe_workers/firebase_to_postgres Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,12 @@ def delete_project(project_ids: list) -> bool:
2222 Deletes project, groups, tasks and results from Firebase and Postgres.
2323 """
2424 for project_id in project_ids :
25+ if project_id is None :
26+ logger .info (
27+ f"Will not delete Null project_id."
28+ )
29+ continue
30+
2531 logger .info (
2632 f"Delete project, groups, tasks and results of project: { project_id } "
2733 )
Original file line number Diff line number Diff line change @@ -121,6 +121,14 @@ def test_project_id_not_exists(self):
121121 self .verify_firebase_not_empty ()
122122 self .verify_postgres_not_empty ()
123123
124+ def test_project_id_empty (self ):
125+ """Test deletion of empty project_id list."""
126+ delete_project .delete_project ([])
127+ time .sleep (5 ) # Wait for Firebase Functions to complete
128+
129+ self .verify_firebase_not_empty ()
130+ self .verify_postgres_not_empty ()
131+
124132 def test_project_id_equals_none (self ):
125133 """Test for project id which does not exists."""
126134 delete_project .delete_project ([None ])
You can’t perform that action at this time.
0 commit comments