Skip to content

Commit

Permalink
Fix value error for new org image
Browse files Browse the repository at this point in the history
  • Loading branch information
cuom1999 committed Jul 18, 2024
1 parent 9dd779f commit 6224649
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions judge/views/contests.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,13 +417,14 @@ def get_context_data(self, **kwargs):
self.request.user
)
context["logo_override_image"] = self.object.logo_override_image

if (
not context["logo_override_image"]
and self.object.organizations.count() == 1
):
context[
"logo_override_image"
] = self.object.organizations.first().organization_image.url
org_image = self.object.organizations.first().organization_image
if org_image:
context["logo_override_image"] = org_image.url

return context

Expand Down

0 comments on commit 6224649

Please sign in to comment.