diff --git a/src/aapi/bases.py b/src/aapi/bases.py index a2bf223..e6d28f5 100644 --- a/src/aapi/bases.py +++ b/src/aapi/bases.py @@ -11,11 +11,9 @@ def as_aapi_dict(self): res = {} if '_type' in attrs.fields_dict(self.__class__): - if not self._type.startswith('Condition'): + if not self._type.startswith('Condition') and not self._type.startswith('Event'): res['Type'] = self._type - if not self._type.startswith('Event'): - res['Type'] = self._type - + if attrs.has(self): for field in attrs.fields(self.__class__): value = self.__getattribute__(field.name)