[Mpuls-commits] r4765 - in base/trunk: . mpulsweb/model
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Mar 8 14:23:29 CET 2011
Author: torsten
Date: 2011-03-08 14:23:28 +0100 (Tue, 08 Mar 2011)
New Revision: 4765
Modified:
base/trunk/ChangeLog
base/trunk/mpulsweb/model/case.py
Log:
Issue1915
Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog 2011-03-08 11:12:25 UTC (rev 4764)
+++ base/trunk/ChangeLog 2011-03-08 13:23:28 UTC (rev 4765)
@@ -3,6 +3,9 @@
* mpulsweb/templates/appointments/edit.mako,
mpulsweb/templates/casemanagement/newAppointment.mako: Issue1865: Fixed
translation.
+ * mpulsweb/model/case.py (MpulsCase.formletter): Issue1915: Fixed
+ generating formletter. Do not stop if one of the querys gives no
+ result. Continue with next query.
2011-03-04 Ludwig Reiter <ludwig.reiter at intevation.de>
Modified: base/trunk/mpulsweb/model/case.py
===================================================================
--- base/trunk/mpulsweb/model/case.py 2011-03-08 11:12:25 UTC (rev 4764)
+++ base/trunk/mpulsweb/model/case.py 2011-03-08 13:23:28 UTC (rev 4765)
@@ -1043,8 +1043,10 @@
d = {'id': self.id}
for sql in letter.get('sql'):
cur.execute(sql, d)
- for k, v in cur.fetchone().iteritems():
- fields[k] = v
+ result = cur.fetchone()
+ if result:
+ for k, v in result.iteritems():
+ fields[k] = v
finally:
db.recycleConnection(conn, cur)
except:
More information about the Mpuls-commits
mailing list