mirror of https://github.com/MISP/PyMISP
Fix error message
parent
d5e28abc70
commit
b66e1258a7
|
@ -119,7 +119,7 @@ class MISPAttribute(object):
|
||||||
def set_all_values(self, **kwargs):
|
def set_all_values(self, **kwargs):
|
||||||
if kwargs.get('type') and kwargs.get('category'):
|
if kwargs.get('type') and kwargs.get('category'):
|
||||||
if kwargs['type'] not in self.category_type_mapping[kwargs['category']]:
|
if kwargs['type'] not in self.category_type_mapping[kwargs['category']]:
|
||||||
raise NewAttributeError('{} and {} is an invalid combinaison, type for this category has to be in {}'.format(self.type, self.category, (', '.join(self.category_type_mapping[kwargs['category']]))))
|
raise NewAttributeError('{} and {} is an invalid combinaison, type for this category has to be in {}'.format(kwargs.get('type'), kwargs.get('category'), (', '.join(self.category_type_mapping[kwargs['category']]))))
|
||||||
# Required
|
# Required
|
||||||
if kwargs.get('type'):
|
if kwargs.get('type'):
|
||||||
self.type = kwargs['type']
|
self.type = kwargs['type']
|
||||||
|
|
Loading…
Reference in New Issue