Skip to content

Commit 16fed4f

Browse files
committed
Fix project not fund
1 parent 0e2fa07 commit 16fed4f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/superannotate/lib/core/usecases.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,10 @@ def execute(self):
129129
if not projects:
130130
self._response.errors = AppException("Project not found.")
131131
else:
132-
self._response.data = next(project for project in projects if project.name == self._name)
132+
project = next((project for project in projects if project.name == self._name), None)
133+
if not project:
134+
self._response.errors = AppException("Project not found")
135+
self._response.data = project
133136
return self._response
134137

135138

0 commit comments

Comments
 (0)