Merge pull request #2469 from bblommers/bugfix/2384

DynamoDB - Fixes query sorting on numerical values
This commit is contained in:
Mike Grima 2019-10-12 15:37:56 -07:00 committed by GitHub
commit d0a6c4380b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 33 additions and 4 deletions

View file

@ -53,16 +53,16 @@ class DynamoType(object):
)
def __lt__(self, other):
return self.value < other.value
return self.cast_value < other.cast_value
def __le__(self, other):
return self.value <= other.value
return self.cast_value <= other.cast_value
def __gt__(self, other):
return self.value > other.value
return self.cast_value > other.cast_value
def __ge__(self, other):
return self.value >= other.value
return self.cast_value >= other.cast_value
def __repr__(self):
return "DynamoType: {0}".format(self.to_json())