Skip to content

Commit

Permalink
fix: Use tuple to compose query
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasfarias committed Jan 30, 2025
1 parent 0766b15 commit 77ee022
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions posthog/temporal/delete_persons/delete_persons_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ async def mogrify_delete_queries_activity(inputs: MogrifyDeleteQueriesActivityIn
logger = get_internal_logger()

select_query = SELECT_QUERY.format(
person_ids_filter=f"AND id IN ({inputs.person_ids})" if inputs.person_ids else ""
person_ids_filter=f"AND id IN {inputs.person_ids}" if tuple(inputs.person_ids) else ""
)
delete_query_person_distinct_ids = DELETE_QUERY_PERSON_DISTINCT_IDS.format(select_query=select_query)
delete_query_person_override = DELETE_QUERY_PERSON_OVERRIDE.format(select_query=select_query)
Expand Down Expand Up @@ -116,7 +116,7 @@ async def delete_persons_activity(inputs: DeletePersonsActivityInputs) -> tuple[
logger = get_internal_logger()

select_query = SELECT_QUERY.format(
person_ids_filter=f"AND id IN ({inputs.person_ids})" if inputs.person_ids else ""
person_ids_filter=f"AND id IN {inputs.person_ids}" if tuple(inputs.person_ids) else ""
)
delete_query_person_distinct_ids = DELETE_QUERY_PERSON_DISTINCT_IDS.format(select_query=select_query)
delete_query_person_override = DELETE_QUERY_PERSON_OVERRIDE.format(select_query=select_query)
Expand Down

0 comments on commit 77ee022

Please sign in to comment.