Skip to content

Commit

Permalink
fix bug with prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
dantownsend committed Sep 6, 2024
1 parent 81b09e4 commit c8d679c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion piccolo_api/encryption/providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def decrypt(self, encrypted_value: str, has_prefix: bool = True) -> str:

def remove_prefix(self, encrypted_value: str) -> str:
if encrypted_value.startswith(self.prefix):
return encrypted_value.lstrip(f"{self.prefix}-")
return encrypted_value.replace(f"{self.prefix}-", "", 1)
else:
raise ValueError(
"Unable to identify which encryption was used - if moving "
Expand Down

0 comments on commit c8d679c

Please sign in to comment.