DeleteWatchedProjects: Don't evict account cache when nothing was deleted
Change-Id: I41c0c10af7a1326208ff55dedcec580faf83c55f
This commit is contained in:
		@@ -79,8 +79,10 @@ public class DeleteWatchedProjects
 | 
			
		||||
          watchesToDelete.add(watchedProjectsMap.get(key));
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
      dbProvider.get().accountProjectWatches().delete(watchesToDelete);
 | 
			
		||||
      accountCache.evict(accountId);
 | 
			
		||||
      if (!watchesToDelete.isEmpty()) {
 | 
			
		||||
        dbProvider.get().accountProjectWatches().delete(watchesToDelete);
 | 
			
		||||
        accountCache.evict(accountId);
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
    return Response.none();
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user