Change location of None-check for id_contrib_props. Fixes #351

master
Desai, Kartikey H 2020-03-04 14:46:55 -05:00
parent fc95b400ff
commit a5cd0fdc50
2 changed files with 3 additions and 3 deletions

View File

@ -54,6 +54,9 @@ def _custom_marking_builder(cls, type, properties, version):
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):
if not re.match(TYPE_REGEX, type):

View File

@ -980,9 +980,6 @@ def CustomObservable(type='x-custom-observable', properties=None, id_contrib_pro
... pass
"""
if id_contrib_props is None:
id_contrib_props = []
def wrapper(cls):
_properties = list(itertools.chain.from_iterable([
[('type', TypeProperty(type))],