Skip to content

Commit

Permalink
Codechange: Use truebrain recommended way of doing type comparisons
Browse files Browse the repository at this point in the history
  • Loading branch information
LordAro authored Sep 12, 2023
1 parent 33a0e5d commit fd616d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bananas_api/new_upload/session_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ def validate_packet_size(session, package):
size += 1
for key, value in Classification().dump(session.get("classification")).items():
size += len(key) + 2
if isinstance(value, str):
if type(value) is str:
size += len(value) + 2
elif isinstance(value, bool):
elif type(value) is bool:
size += len("yes") + 2
else:
raise ValueError("Unknown type for classification value")
Expand Down

0 comments on commit fd616d2

Please sign in to comment.