Skip to content

Commit

Permalink
fix: used json.dumps instead of str in sanitize_params
Browse files Browse the repository at this point in the history
  • Loading branch information
vincent-frimpong committed Oct 15, 2022
1 parent c1105dc commit e3a1128
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion postgrest/utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import json
from __future__ import annotations

from typing import Any
Expand All @@ -12,7 +13,7 @@ def aclose(self) -> None:


def sanitize_param(param: Any) -> str:
param_str = str(param)
param_str = json.dumps(param)
reserved_chars = ".,:()"
if any(char in param_str for char in reserved_chars):
return f'"{param_str}"'
Expand Down

0 comments on commit e3a1128

Please sign in to comment.