diff --git a/app-center-services/src/main/java/io/meeds/appcenter/service/ApplicationCenterService.java b/app-center-services/src/main/java/io/meeds/appcenter/service/ApplicationCenterService.java index ef9c68d25..c1bf044cd 100644 --- a/app-center-services/src/main/java/io/meeds/appcenter/service/ApplicationCenterService.java +++ b/app-center-services/src/main/java/io/meeds/appcenter/service/ApplicationCenterService.java @@ -283,7 +283,10 @@ public void addFavoriteApplication(long applicationId, String username) throws A username, application.getTitle())); } - appCenterStorage.addApplicationToUserFavorite(applicationId, username); + boolean isFavoriteApplication = appCenterStorage.isFavoriteApplication(applicationId, username); + if (!isFavoriteApplication) { + appCenterStorage.addApplicationToUserFavorite(applicationId, username); + } } /**