From b27cf536d637937648df170c8cf34bc660073852 Mon Sep 17 00:00:00 2001 From: CollinBeczak Date: Mon, 18 Dec 2023 07:50:51 -0600 Subject: [PATCH] add default image for avatarUrls --- .../framework/repository/ChallengeCommentRepository.scala | 4 ++-- .../maproulette/framework/repository/CommentRepository.scala | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/org/maproulette/framework/repository/ChallengeCommentRepository.scala b/app/org/maproulette/framework/repository/ChallengeCommentRepository.scala index 499a3866..dc61ab20 100644 --- a/app/org/maproulette/framework/repository/ChallengeCommentRepository.scala +++ b/app/org/maproulette/framework/repository/ChallengeCommentRepository.scala @@ -123,7 +123,7 @@ object ChallengeCommentRepository { id, osmId, name, - avatarUrl, + avatarUrl = Option(avatarUrl).getOrElse("/assets/images/user_no_image.png"), challengeId, projectId, created, @@ -142,7 +142,7 @@ object ChallengeCommentRepository { id, osmId, name, - avatarUrl, + avatarUrl = Option(avatarUrl).getOrElse("/assets/images/user_no_image.png"), challengeId, projectId, created, diff --git a/app/org/maproulette/framework/repository/CommentRepository.scala b/app/org/maproulette/framework/repository/CommentRepository.scala index 2fa8b61b..cb7ae694 100644 --- a/app/org/maproulette/framework/repository/CommentRepository.scala +++ b/app/org/maproulette/framework/repository/CommentRepository.scala @@ -177,7 +177,7 @@ object CommentRepository { id, osm_id = osmId, osm_username = name, - avatarUrl, + avatarUrl = Option(avatarUrl).getOrElse("/assets/images/user_no_image.png"), taskId = taskId, challengeId = challengeId, projectId = projectId, @@ -201,7 +201,7 @@ object CommentRepository { id, osm_id = osmId, osm_username = name, - avatarUrl, + avatarUrl = Option(avatarUrl).getOrElse("/assets/images/user_no_image.png"), taskId = taskId, challengeId = challengeId, projectId = projectId,