Changes between Version 1 and Version 2 of Ticket #27147, comment 8
- Timestamp:
- Aug 1, 2018, 8:27:29 AM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #27147, comment 8
v1 v2 18 18 def from_db_value(self, value, expression, connection): 19 19 # we're checking if bounds differ from default value 20 # it's needed, because psycopg2 always returns Range with '[)' bounds 21 if self.bounds[0] == '(': 22 value._lower = value._lower - unit_diff 23 if self.bounds[1] == ']': 24 value._upper = value._upper - unit_diff 20 if self.bounds[0] == '(' and value.lower: 21 value._lower = value.lower - unit_diff 22 if self.bounds[1] == ']' and value.upper: 23 value._upper = value.upper - unit_diff 25 24 value._bounds = self.bounds 26 25 return value