[Mpuls-commits] r1671 - in waska/trunk: . waskaweb/controllers

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Feb 19 16:06:40 CET 2010


Author: roland
Date: 2010-02-19 16:06:32 +0100 (Fri, 19 Feb 2010)
New Revision: 1671

Modified:
   waska/trunk/ChangeLog
   waska/trunk/waskaweb/controllers/case.py
Log:
Adapted logic for evaluation handling

Modified: waska/trunk/ChangeLog
===================================================================
--- waska/trunk/ChangeLog	2010-02-19 14:20:52 UTC (rev 1670)
+++ waska/trunk/ChangeLog	2010-02-19 15:06:32 UTC (rev 1671)
@@ -1,5 +1,12 @@
 2010-02-19	Roland Geider <roland.geider at intevation.de>
 
+	Bugfixes
+
+	* waskaweb/controllers/case.py (save): No autogenerated ID required.
+        Reset evaluation_id for all cases except acceptance of evaluation.
+
+2010-02-19	Roland Geider <roland.geider at intevation.de>
+
 	First prototype of extension 2010-01 (Evaluations).
 
 	* waskaweb/controllers/case.py (save): Added field logic for

Modified: waska/trunk/waskaweb/controllers/case.py
===================================================================
--- waska/trunk/waskaweb/controllers/case.py	2010-02-19 14:20:52 UTC (rev 1670)
+++ waska/trunk/waskaweb/controllers/case.py	2010-02-19 15:06:32 UTC (rev 1671)
@@ -538,18 +538,15 @@
         
         # If the young adult does not take part in the evaluation, the evaluation number
         # is (re)set to null
-        if request.params.getone('teilnahme_evaluation') in [u'-1', u'3', u'4', u'5']:
+        if request.params.getone('teilnahme_evaluation') in [u'-1', u'1', u'3', u'4', u'5']:
             request_data['evaluation_nummer'] = ['']
         # Generate the ID (we do not check for uniqueness)
         # ID is created from the agency name, the evaluation abbreviation and a number
         elif request.params.getone('evaluation_nummer') == '':
-            # TODO: @roland from roland: remove the random part
-            import random
-            evaluation_nr     = random.randint(1,1000)
             agency            = Agency()
             evaluation_id     = agency.getEvaluationId()
             evaluation_agency = agency.getName()
-            request_data['evaluation_nummer'] = ["%s/%s-%d" % (evaluation_agency, evaluation_id, evaluation_nr)]
+            request_data['evaluation_nummer'] = ["%s/%s-" % (evaluation_agency, evaluation_id)]
         
         #print >> sys.stderr, request_data
 



More information about the Mpuls-commits mailing list