Skip to content

Commit

Permalink
Fix type error
Browse files Browse the repository at this point in the history
Fixing error:
File "/usr/src/app/helpers/main_helper.py", line 272, in reformat
    maximum_length = maximum_length - int(directory_count+path_count+extra_count)
TypeError: unsupported operand type(s) for -: 'str' and 'int'

Seems like prepared_format.maximum_length is a string.
  • Loading branch information
throwaway-of authored Nov 22, 2020
1 parent f760bcf commit a2ca20d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion helpers/main_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def reformat(prepared_format, unformatted):
date = prepared_format.date
text = prepared_format.text
value = "Free"
maximum_length = prepared_format.maximum_length
maximum_length = int(prepared_format.maximum_length)
post_id = "" if post_id is None else str(post_id)
media_id = "" if media_id is None else str(media_id)
extra_count = 0
Expand Down

0 comments on commit a2ca20d

Please sign in to comment.