[Mpuls-commits] r2668 - wasko/branches/2.0/mpulsweb/model
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed May 5 17:33:37 CEST 2010
Author: torsten
Date: 2010-05-05 17:33:36 +0200 (Wed, 05 May 2010)
New Revision: 2668
Modified:
wasko/branches/2.0/mpulsweb/model/case.py
Log:
* mpulsweb/model/case.py (MpulsCase.make_consistent): Fixed setting of
values
Modified: wasko/branches/2.0/mpulsweb/model/case.py
===================================================================
--- wasko/branches/2.0/mpulsweb/model/case.py 2010-05-05 15:32:15 UTC (rev 2667)
+++ wasko/branches/2.0/mpulsweb/model/case.py 2010-05-05 15:33:36 UTC (rev 2668)
@@ -745,29 +745,36 @@
# Fill all other fields with "unknown" values.
for field in start.fields:
- if data.has_key("%s:%s" % (field.name, self.id)): continue
+ if data.has_key("%s" % (field.id)): continue
item = self._get_formed_item(field.name)
value = item.getValue()
- log.debug('Current value of %s: %s' % (field.name, value))
+ log.debug('Current value of %s: %s' % (field.id, value))
if value in [-1, "-1", None, ""]:
def_value = get_unknown_value(item)
if def_value:
- log.debug("Setting %s to %s" % (field.name, def_value))
- data["%s:%s" % (field.name, self.id)] = def_value
+ log.debug("Setting %s to %s" % (field.id, def_value))
+ data["%s" % (field.id)] = def_value
for field in end.fields:
- if data.has_key("%s:%s" % (field.name, self.id)): continue
+ if data.has_key("%s" % (field.id)): continue
item = self._get_formed_item(field.name)
value = item.getValue()
- log.debug('Current value of %s: %s' % (field.name, value))
+ log.debug('Current value of %s: %s' % (field.id, value))
if item.getValue() in [-1, "-1", None, ""]:
def_value = get_unknown_value(item)
if def_value:
- log.debug("Setting %s to %s" % (field.name, def_value))
- data["%s:%s" % (field.name, self.id)] = def_value
+ log.debug("Setting %s to %s" % (field.id, def_value))
+ data["%s" % (field.id)] = def_value
# Set values
- self.formed_instance.setData(data)
- self.formed_instance.commit()
+ try:
+ log.debug(data)
+ self.formed_instance.setData(data)
+ except Exception, e:
+ log.debug(e)
+
+ log.exception("test")
+ raise
+ #self.formed_instance.commit()
def make_anonymizable(self):
"""Will ensure that the case is in a anonymizable state. This means
More information about the Mpuls-commits
mailing list