Change location of None-check for id_contrib_props. Fixes #351
parent
fc95b400ff
commit
a5cd0fdc50
|
@ -54,6 +54,9 @@ def _custom_marking_builder(cls, type, properties, version):
|
||||||
|
|
||||||
|
|
||||||
def _custom_observable_builder(cls, type, properties, version, id_contrib_props=None):
|
def _custom_observable_builder(cls, type, properties, version, id_contrib_props=None):
|
||||||
|
if id_contrib_props is None:
|
||||||
|
id_contrib_props = []
|
||||||
|
|
||||||
class _CustomObservable(cls, _Observable):
|
class _CustomObservable(cls, _Observable):
|
||||||
|
|
||||||
if not re.match(TYPE_REGEX, type):
|
if not re.match(TYPE_REGEX, type):
|
||||||
|
|
|
@ -980,9 +980,6 @@ def CustomObservable(type='x-custom-observable', properties=None, id_contrib_pro
|
||||||
... pass
|
... pass
|
||||||
|
|
||||||
"""
|
"""
|
||||||
if id_contrib_props is None:
|
|
||||||
id_contrib_props = []
|
|
||||||
|
|
||||||
def wrapper(cls):
|
def wrapper(cls):
|
||||||
_properties = list(itertools.chain.from_iterable([
|
_properties = list(itertools.chain.from_iterable([
|
||||||
[('type', TypeProperty(type))],
|
[('type', TypeProperty(type))],
|
||||||
|
|
Loading…
Reference in New Issue