--- a/cubicweb/devtools/fill.py Thu Feb 11 21:59:49 2016 +0100
+++ b/cubicweb/devtools/fill.py Wed Feb 17 13:45:34 2016 +0100
@@ -42,6 +42,9 @@
from cubicweb.schema import RQLConstraint
def custom_range(start, stop, step):
+ if start == stop:
+ yield start
+ return
while start < stop:
yield start
start += step
@@ -214,8 +217,10 @@
minvalue = maxvalue = None
for cst in self.eschema.rdef(attrname).constraints:
if isinstance(cst, IntervalBoundConstraint):
- minvalue = self._actual_boundary(entity, attrname, cst.minvalue)
- maxvalue = self._actual_boundary(entity, attrname, cst.maxvalue)
+ if cst.minvalue is not None:
+ minvalue = self._actual_boundary(entity, attrname, cst.minvalue)
+ if cst.maxvalue is not None:
+ maxvalue = self._actual_boundary(entity, attrname, cst.maxvalue)
elif isinstance(cst, BoundaryConstraint):
if cst.operator[0] == '<':
maxvalue = self._actual_boundary(entity, attrname, cst.boundary)