Skip to content

Commit b952981

Browse files
What if numbers aren't numbers
1 parent d6d3fb1 commit b952981

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: appstore/utils.py

+4
Original file line numberDiff line numberDiff line change
@@ -522,4 +522,8 @@ def first_version_is_newer(current_release, old_release):
522522
# Current version is longer than old version. I.e. 1.2.1 vs 1.2
523523
# As long as it's not 0, current is newer
524524
return current != 0
525+
except ValueError:
526+
# The field is a string so it might not be a number
527+
# In such a case we can't compare so just fail until they change it
528+
return False
525529
return False

0 commit comments

Comments
 (0)