Skip to content

Commit

Permalink
Do not send non-existent images for public institutions
Browse files Browse the repository at this point in the history
  • Loading branch information
oharsta committed Dec 18, 2024
1 parent 6124b93 commit aafa388
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/institution/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,10 @@ def get_json(self, obi_version, expand_awards=False):
entityId=self.entity_id,
description=self.description,
description_english=self.description_english,
description_dutch=self.description_dutch,
image=image_url,
description_dutch=self.description_dutch
))
if self.image_english or self.image_dutch:
json['image'] = f"{image_url}"
if self.image_english:
json['image_english'] = f"{image_url}?lang=en"
if self.image_dutch:
Expand Down

0 comments on commit aafa388

Please sign in to comment.