Skip to content

Commit a5fc67f

Browse files
author
ci.datadog-api-spec
committed
pre-commit fixes
1 parent 1264ca7 commit a5fc67f

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/datadog_api_client/model_utils.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -578,8 +578,6 @@ def to_str(self):
578578

579579
def get_oneof_instance(self):
580580
"""Returns the oneOf instance"""
581-
if not self._composed_instances:
582-
return self
583581
return self._composed_instances[0]
584582

585583
def __eq__(self, other):
@@ -1499,7 +1497,7 @@ def model_to_dict(model_instance, serialize=True):
14991497

15001498
model_instances = [model_instance]
15011499
model = model_instance
1502-
while model._composed_schemas and model._composed_instances:
1500+
while model._composed_schemas:
15031501
model_instances.extend(model._composed_instances)
15041502
model = model.get_oneof_instance()
15051503

0 commit comments

Comments
 (0)