diff --git a/moto/dynamodb2/models.py b/moto/dynamodb2/models.py index 0f4594aa4..10fe75c0f 100644 --- a/moto/dynamodb2/models.py +++ b/moto/dynamodb2/models.py @@ -45,16 +45,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())