[FIX] survey: catch exception while quizz mode
authorRichard Mathot <rim@openerp.com>
Tue, 1 Jul 2014 13:56:50 +0000 (15:56 +0200)
committerRichard Mathot <rim@openerp.com>
Tue, 1 Jul 2014 13:56:50 +0000 (15:56 +0200)
addons/survey/survey.py

index 3a9145e..1389e63 100644 (file)
@@ -993,6 +993,8 @@ class survey_user_input_line(osv.Model):
     def __get_mark(self, cr, uid, value_suggested, context=None):
         try:
             mark = self.pool.get('survey.label').browse(cr, uid, int(value_suggested), context=context).quizz_mark
+        except AttributeError:
+            mark = 0.0
         except KeyError:
             mark = 0.0
         except ValueError: