Skip to content

Commit

Permalink
Merge pull request #1983 from IFRCGo/fix/dref-default-image
Browse files Browse the repository at this point in the history
Add default image for dref static url
  • Loading branch information
thenav56 authored Dec 20, 2023
2 parents 3018238 + a195930 commit 8a2a533
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dref/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def get_image_map(title, request):
NationalSocietyAction.Title.MULTI_PURPOSE_CASH: "cash.png",
NationalSocietyAction.Title.OTHER: "favicon.png",
}
return request.build_absolute_uri(static(os.path.join("images/dref", title_static_map[title])))
return request.build_absolute_uri(static(os.path.join("images/dref", title_static_map.get(title, "favicon.png"))))


@reversion.register()
Expand Down Expand Up @@ -114,7 +114,7 @@ def get_image_map(title, request):
IdentifiedNeed.Title.ENVIRONMENT_SUSTAINABILITY: "environment.png",
IdentifiedNeed.Title.COMMUNITY_ENGAGEMENT_AND_ACCOUNTABILITY: "participation_team.png",
}
return request.build_absolute_uri(static(os.path.join("images/dref", title_static_map[title])))
return request.build_absolute_uri(static(os.path.join("images/dref", title_static_map.get(title, "favicon.png"))))


@reversion.register()
Expand Down Expand Up @@ -193,7 +193,7 @@ def get_image_map(title, request):
PlannedIntervention.Title.COMMUNITY_ENGAGEMENT_AND_ACCOUNTABILITY: "participation_team.png",
PlannedIntervention.Title.COORDINATION_AND_PARTNERSHIPS: "coordination.png"
}
return request.build_absolute_uri(static(os.path.join("images/dref", title_static_map[title])))
return request.build_absolute_uri(static(os.path.join("images/dref", title_static_map.get(title, "favicon.png"))))


@reversion.register()
Expand Down

0 comments on commit 8a2a533

Please sign in to comment.