Skip to content

Commit a17081f

Browse files
committed
Fix project update return
1 parent 21af47c commit a17081f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/superannotate/lib/core/usecases.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,8 @@ def execute(self):
323323
if self.is_valid():
324324
for field, value in self._project_data.items():
325325
setattr(self._project, field, value)
326-
self._response.data = self._projects.update(self._project)
326+
new_project = self._projects.update(self._project)
327+
self._response.data = new_project.to_dict()
327328
return self._response
328329

329330

src/superannotate/lib/infrastructure/repositories.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,10 @@ def insert(self, entity: ProjectEntity) -> ProjectEntity:
9797

9898
def update(self, entity: ProjectEntity):
9999
condition = Condition("team_id", entity.team_id, EQ)
100-
return self._service.update_project(
100+
result = self._service.update_project(
101101
entity.to_dict(), query_string=condition.build_query()
102102
)
103+
return self.dict2entity(result)
103104

104105
def delete(self, entity: ProjectEntity):
105106
team_id = entity.team_id

0 commit comments

Comments
 (0)