Skip to content

Commit

Permalink
JENKINS-50603: Verify that the job was a favorite before adding it again
Browse files Browse the repository at this point in the history
  • Loading branch information
deepy committed Apr 18, 2018
1 parent 983893f commit 030b2af
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -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);
}
Expand Down

0 comments on commit 030b2af

Please sign in to comment.