Skip to content

Commit 9211b86

Browse files
author
nik
committed
Remove excessive calls in task api
1 parent fb48fc7 commit 9211b86

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

label_studio/tasks/api.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,9 @@ def get(self, request, pk):
183183
context['project'] = self.task.project
184184

185185
# get prediction
186-
self.task.refresh_predictions()
187-
self.task.refresh_from_db()
186+
if self.task.project.show_collab_predictions:
187+
self.task.refresh_predictions()
188+
self.task.refresh_from_db()
188189

189190
# predictions = retrieve_predictions([task])
190191
# if predictions:

0 commit comments

Comments
 (0)