Skip to content

Commit

Permalink
Update default_interface property
Browse files Browse the repository at this point in the history
  • Loading branch information
amickan committed Dec 18, 2024
1 parent 01925c8 commit c013aa6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions app/grandchallenge/algorithms/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,12 +517,12 @@ def default_interface(self):
try:
return self.interfaces.get()
except MultipleObjectsReturned:
try:
return self.interfaces.get(
algorithmalgorithminterface__is_default=True
)
except ObjectDoesNotExist:
return None
return self.interfaces.get(
algorithmalgorithminterface__is_default=True
)
except ObjectDoesNotExist:
# this is the case for newly created algorithms
return None

def is_editor(self, user):
return user.groups.filter(pk=self.editors_group.pk).exists()
Expand Down

0 comments on commit c013aa6

Please sign in to comment.