Fix broken removeGenre implementation in Album entity
This commit is contained in:
parent
d70fae0719
commit
bcd03fc7ce
|
|
@ -98,9 +98,11 @@ public class Album {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeGenre(Genre genre) {
|
public void removeGenre(Genre genre) {
|
||||||
|
albumGenres.removeIf(ag ->
|
||||||
ag.getGenre() != null &&
|
ag.getGenre() != null &&
|
||||||
ag.getGenre().getId() != null &&
|
ag.getGenre().getId() != null &&
|
||||||
ag.getGenre().getId().equals(genre.getId())
|
ag.getGenre().getId().equals(genre.getId())
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Método conveniente para pegar só os gêneros
|
// Método conveniente para pegar só os gêneros
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue