mirror of
https://github.com/gmbrax/MediaManager-core.git
synced 2026-11-09 14:00:17 +00:00
Enhance genre removal logic in Album class
Update removeGenre method to check for null IDs.
This commit is contained in:
@@ -98,9 +98,9 @@ public class Album {
|
||||
}
|
||||
|
||||
public void removeGenre(Genre genre) {
|
||||
albumGenres.removeIf(ag ->
|
||||
ag.getGenre() != null && ag.getGenre().getId().equals(genre.getId())
|
||||
);
|
||||
ag.getGenre() != null &&
|
||||
ag.getGenre().getId() != null &&
|
||||
ag.getGenre().getId().equals(genre.getId())
|
||||
}
|
||||
|
||||
// Método conveniente para pegar só os gêneros
|
||||
|
||||
Reference in New Issue
Block a user