Merge pull request #6 from johnlpuc163/xu.bug_DynamoType_compare

Use cast_value when comparing DynamoType
This commit is contained in:
Bert Blommers 2019-10-10 09:19:10 +01:00 committed by GitHub
commit a3f3d5661b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,16 +49,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())