Skip to content

Commit c9beb00

Browse files
committed
Updated project serialzier
1 parent 9e06f66 commit c9beb00

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

pytest.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ minversion = 3.7
33
log_cli=true
44
python_files = test_*.py
55
;pytest_plugins = ['pytest_profiling']
6-
;addopts = -n auto --dist=loadscope
6+
addopts = -n auto --dist=loadscope
77

src/superannotate/lib/app/serializers.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,10 @@ def serialize(
122122
if exclude:
123123
for field in exclude:
124124
to_exclude[field] = True
125-
125+
if self._entity.classes:
126+
self._entity.classes = [
127+
i.dict(by_alias=True, exclude_unset=True) for i in self._entity.classes
128+
]
126129
data = super().serialize(fields, by_alias, flat, to_exclude)
127130
if data.get("settings"):
128131
data["settings"] = [

0 commit comments

Comments
 (0)