1
0
Fork 0
mirror of https://github.com/yweber/lodel2.git synced 2025-10-21 16:49:02 +02:00

Bugfixe in leobject

Deleted hardcoded condition that brokes standart field validation process
This commit is contained in:
Yann 2016-07-21 14:33:02 +02:00
commit 0aec7f6ca8
4 changed files with 2 additions and 2 deletions

Binary file not shown.

View file

@ -192,7 +192,7 @@ class Reference(DataHandler):
# @param internal bool : if False, the field is not internal
# @param **kwargs : other arguments
def __init__(self, allowed_classes = None, back_reference = None, internal=False, **kwargs):
self.__allowed_classes = [] if allowed_classes is None else set(allowed_classes)
self.__allowed_classes = set() if allowed_classes is None else set(allowed_classes)
logger.warning("We're going to inialize an temporary attribute, don't forget to fix this issue")
if back_reference is not None:
if len(back_reference) != 2:

View file

@ -499,7 +499,7 @@ DS_PLUGIN_NAME.DS_INSTANCE_NAME. But got %s" % ds_identifier)
correct = set() #valid fields name
mandatory = set() #mandatory fields name
for fname, datahandler in cls._fields.items():
if allow_internal or not datahandler.is_internal() or fname == CLASS_ID_FIELDNAME:
if allow_internal or not datahandler.is_internal():
correct.add(fname)
if complete and not hasattr(datahandler, 'default'):
mandatory.add(fname)

Binary file not shown.