mirror of
https://github.com/gmbrax/MediaManager-core.git
synced 2026-11-09 14:00:17 +00:00
Merge pull request #24 from gmbrax/fix/fix-broken-album-method
Fix broken removeGenre implementation in Album entity
This commit is contained in:
@@ -98,9 +98,14 @@ public class Album {
|
||||
}
|
||||
|
||||
public void removeGenre(Genre genre) {
|
||||
ag.getGenre() != null &&
|
||||
ag.getGenre().getId() != null &&
|
||||
ag.getGenre().getId().equals(genre.getId())
|
||||
if (genre == null) {
|
||||
return;
|
||||
}
|
||||
albumGenres.removeIf(ag ->
|
||||
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