Skip to content
Permalink
Browse files

JENKINS-50603: Verify that the job was a favorite before adding it again

  • Loading branch information
deepy committed Apr 18, 2018
1 parent 983893f commit 030b2affca66c8e6709d52327799563ba62de232
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/main/java/hudson/plugins/favorite/user/FavoriteJobListener.java
@@ -21,7 +21,7 @@ public void onRenamed(Item item, String oldName, String newName) {
for (User user : User.getAll()) {
FavoriteUserProperty fup = user.getProperty(FavoriteUserProperty.class);
try {
if (fup != null) {
if (fup != null && fup.isJobFavorite(oldName)) {
fup.deleteFavourite(oldName);
fup.addFavorite(newName);
}

0 comments on commit 030b2af

Please sign in to comment.
You can’t perform that action at this time.