Skip to content

Commit

Permalink
fix: don't return str(None)
Browse files Browse the repository at this point in the history
Closes: #44
  • Loading branch information
b1rger committed Feb 22, 2024
1 parent bf6393a commit 5ef1ef4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions viecpro_typesense/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@


def fixstring(string):
string = str(string)
string = re.sub(REG_SKL, "", string)
string = re.sub(REG_EKL, "", string)
string = re.sub(REG_GKL, "", string)
if isinstance(string, str):
string = re.sub(REG_SKL, "", string)
string = re.sub(REG_EKL, "", string)
string = re.sub(REG_GKL, "", string)
return string


Expand Down
8 changes: 4 additions & 4 deletions viecpro_typesense_detail/details/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@


def fixstring(string):
string = str(string)
string = re.sub(REG_SKL, "", string)
string = re.sub(REG_EKL, "", string)
string = re.sub(REG_GKL, "", string)
if isinstance(string, str):
string = re.sub(REG_SKL, "", string)
string = re.sub(REG_EKL, "", string)
string = re.sub(REG_GKL, "", string)
return string


Expand Down

0 comments on commit 5ef1ef4

Please sign in to comment.