Fix rowcount usage

review68001
(transplanted from 14c066caee18aec33bf9710324aefe4559433b20)
This commit is contained in:
Cédric Krier committed 2011-07-31 17:13:46 +02:00
1 parent a2a2c2dc11
commit 87595d6a74
1 file changed
+4 -1
+4 -1
View File
@@ -106,7 +106,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