Skip to content

Commit

Permalink
Prevent DB hits on sorting CIVs
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvanrun committed Dec 30, 2024
1 parent 4315573 commit 4c14d3a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/grandchallenge/components/templatetags/civ.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ def sort_civs(civs: Iterable[ComponentInterfaceValue]):
charts.append(v)
else:
values.append(v)
elif v.file:
elif v.interface.is_file_kind:
if v.interface.is_thumbnail_kind:
thumbnails.append(v)
else:
files.append(v)
elif v.image:
elif v.interface.is_image_kind:
images.append(v)
else:
residual.append(v)
Expand Down

0 comments on commit 4c14d3a

Please sign in to comment.