Fix - Issue #141

This commit is contained in:
Mauricio Baeza 2018-01-23 00:20:23 -06:00
commit 99e843db15
1 changed files with 4 additions and 1 deletions

View File

@ -2219,7 +2219,10 @@ class Productos(BaseModel):
.order_by(Productos.clave)
.tuples()
)
value = max([int(v[0]) for v in values if v[0].isdigit()])
values = [int(v[0]) for v in values if v[0].isdigit()]
value = 0
if values:
value = max(values)
value = value or 0
value += 1