Fix rowcount usage
review68001 (transplanted from 14c066caee18aec33bf9710324aefe4559433b20)
This commit is contained in:
1 parent
bb83b87a34
commit
d49321acdf
1 file changed
+4
-1
+4
-1
@@ -95,7 +95,10 @@ class Forecast(ModelWorkflow, ModelSQL, ModelView):
|
||||
forecast.from_date, forecast.to_date,
|
||||
forecast.location.id, forecast.destination.id,
|
||||
forecast.id))
|
||||
if cursor.rowcount:
|
||||
rowcount = cursor.rowcount
|
||||
if rowcount == -1 or rowcount is None:
|
||||
rowcount = len(cursor.fetchall())
|
||||
if rowcount:
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
Reference in new issue
Block a user