Skip to content

Commit

Permalink
4258 - Fix default (fallback) profile picture (#4261)
Browse files Browse the repository at this point in the history
Co-authored-by: Heroku-Deploy <>
  • Loading branch information
sorja authored Jan 25, 2025
1 parent 9b02a60 commit 8afb4c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/server/controller/user/getProfilePicture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ export const getProfilePicture = async (
): Promise<UserProfilePicture> => {
const { id } = props
const userProfilePicture = await UserRepository.getProfilePicture({ id }, client)
const key = userProfilePicture.uuid
const key = userProfilePicture?.uuid
if (!key) return null
const data = await FileStorage.getFile({ key })
return {
...userProfilePicture,
Expand Down
2 changes: 1 addition & 1 deletion src/server/repository/public/user/getProfilePicture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const getProfilePicture = async (
`
select f.uuid, f.name
from public.users u
left join file f on u.profile_picture_file_uuid = f.uuid
join file f on u.profile_picture_file_uuid = f.uuid
${where}
`,
[value]
Expand Down

0 comments on commit 8afb4c2

Please sign in to comment.