Import pyson locally to not break installation
issue2705 review450001
This commit is contained in:
1 parent
fbf2406f5e
commit
8e261096ce
1 file changed
+2
-1
+2
-1
@@ -20,7 +20,6 @@ from decimal import Decimal
|
||||
from types import NoneType
|
||||
|
||||
import proteus.config
|
||||
from proteus.pyson import PYSONDecoder
|
||||
|
||||
_MODELS = threading.local()
|
||||
|
||||
@@ -760,6 +759,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):
|
||||
|
||||
Reference in new issue
Block a user