mirror of
https://github.com/yweber/lodel2.git
synced 2026-02-14 05:50:12 +01:00
fieldtypes, leo: check attr before using method
This commit is contained in:
parent
0baf161bd2
commit
a2cd199f10
1 changed files with 1 additions and 1 deletions
|
|
@ -32,7 +32,7 @@ class EmFieldType(ReferenceFieldType):
|
|||
cur_value = int(cur_value)
|
||||
except (ValueError, TypeError) as e:
|
||||
raise e # Raise Here !?
|
||||
if cur_value.is_leobject():
|
||||
if hasattr(cur_value, 'is_leobject') and cur_value.is_leobject():
|
||||
# Its an object not populated (we dont now its type)
|
||||
cur_value = cur_value.lodel_id #Optimize here giving only class_id and type_id to populate ?
|
||||
if isinstance(cur_value, int):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue