Skip to content

Commit bbe1624

Browse files
Manu ChaudharyManu Chaudhary
authored andcommitted
issue fix
1 parent 7420922 commit bbe1624

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

imagekitio/utils/calculation.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ def hamming_distance(first: str, second: str) -> int:
2222

2323
def get_authenticated_params(token, expire, private_key):
2424
default_expire = int(dt.now().strftime("%s")) + DEFAULT_TIME_DIFF
25+
token = token or str(uuid.uuid4()
2526
auth_params = {"token": token, "expire": expire, "signature": ""}
2627

2728
if not private_key:
@@ -32,7 +33,7 @@ def get_authenticated_params(token, expire, private_key):
3233
digestmod=hashlib.sha1,
3334
).hexdigest()
3435

35-
auth_params["token"] = token or str(uuid.uuid4())
36+
auth_params["token"] = token
3637
auth_params["expire"] = expire or default_expire
3738
auth_params["signature"] = signature
3839

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
setuptools.setup(
1010
name="imagekitio",
11-
version="2.2.0",
11+
version="2.2.1",
1212
description="Python wrapper for the ImageKit API",
1313
long_description=long_description,
1414
long_description_content_type="text/markdown",

0 commit comments

Comments
 (0)