Skip to content

Commit e6fdb6f

Browse files
fix(front): broken image in deployments history if user is deleted (#198)
## 📝 Description renderedtext/tasks#7755 How it currently looks: ![Screenshot 2025-04-03 at 14 24 20](https://github.com/user-attachments/assets/a87cd3df-7aa5-47c9-a7df-0a104b68a780) How it looks after the change: ![Screenshot 2025-04-03 at 14 38 57](https://github.com/user-attachments/assets/297dede0-2579-4f42-a43f-2244bc033275) ## ✅ Checklist - [x] I have tested this change - [ ] This change requires documentation update
1 parent 37711b2 commit e6fdb6f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

front/lib/front/models/deployment_details.ex

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ defmodule Front.Models.DeploymentDetails do
6161
end
6262

6363
def preload_triggerer(deployment = %__MODULE__{}, nil) do
64-
%__MODULE__{
65-
deployment
66-
| author_name: Application.get_env(:front, :default_user_name),
67-
author_avatar_url: FrontWeb.SharedHelpers.assets_path()
68-
}
64+
author_name = Application.get_env(:front, :default_user_name)
65+
first_letter = author_name |> String.first() |> String.downcase()
66+
avatar_url = "#{FrontWeb.SharedHelpers.assets_path()}/images/org-#{first_letter}.svg"
67+
68+
%__MODULE__{deployment | author_name: author_name, author_avatar_url: avatar_url}
6969
end
7070
end
7171

0 commit comments

Comments
 (0)