Import pyson locally to not break installation

issue2705
review450001
(transplanted from 433368c5f09898fced213c19da8c82741d9caab0)
This commit is contained in:
Cédric Krier committed 2012-07-26 11:30:40 +02:00
1 parent 09e62af017
commit 993a08776c
1 file changed
+2 -1
+2 -1
View File
@@ -10,7 +10,6 @@ import threading
import datetime
from decimal import Decimal
import proteus.config
from proteus.pyson import PYSONDecoder
_MODELS = threading.local()
@@ -707,6 +706,8 @@ class Model(object):
def _on_change(self, name):
'Call on_change for field'
# Import locally to not break installation
from proteus.pyson import PYSONDecoder
definition = self._fields[name]
if definition.get('on_change'):
if isinstance(definition['on_change'], basestring):