mirror of
https://github.com/yweber/lodel2.git
synced 2025-12-16 23:06:54 +01:00
Bugfixe in leobject
Deleted hardcoded condition that brokes standart field validation process
This commit is contained in:
parent
a759ca3572
commit
0aec7f6ca8
4 changed files with 2 additions and 2 deletions
Binary file not shown.
|
|
@ -192,7 +192,7 @@ class Reference(DataHandler):
|
||||||
# @param internal bool : if False, the field is not internal
|
# @param internal bool : if False, the field is not internal
|
||||||
# @param **kwargs : other arguments
|
# @param **kwargs : other arguments
|
||||||
def __init__(self, allowed_classes = None, back_reference = None, internal=False, **kwargs):
|
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")
|
logger.warning("We're going to inialize an temporary attribute, don't forget to fix this issue")
|
||||||
if back_reference is not None:
|
if back_reference is not None:
|
||||||
if len(back_reference) != 2:
|
if len(back_reference) != 2:
|
||||||
|
|
|
||||||
|
|
@ -499,7 +499,7 @@ DS_PLUGIN_NAME.DS_INSTANCE_NAME. But got %s" % ds_identifier)
|
||||||
correct = set() #valid fields name
|
correct = set() #valid fields name
|
||||||
mandatory = set() #mandatory fields name
|
mandatory = set() #mandatory fields name
|
||||||
for fname, datahandler in cls._fields.items():
|
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)
|
correct.add(fname)
|
||||||
if complete and not hasattr(datahandler, 'default'):
|
if complete and not hasattr(datahandler, 'default'):
|
||||||
mandatory.add(fname)
|
mandatory.add(fname)
|
||||||
|
|
|
||||||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue