mirror of
https://github.com/navidrome/navidrome.git
synced 2025-06-09 11:52:35 +03:00
Use transaction's DataStore
This commit is contained in:
parent
f1b6703ab0
commit
f745b8d223
@ -144,7 +144,7 @@ func (c *MediaAnnotationController) setStar(ctx context.Context, star bool, ids
|
|||||||
|
|
||||||
err := c.ds.WithTx(func(tx model.DataStore) error {
|
err := c.ds.WithTx(func(tx model.DataStore) error {
|
||||||
for _, id := range ids {
|
for _, id := range ids {
|
||||||
exist, err := c.ds.Album(ctx).Exists(id)
|
exist, err := tx.Album(ctx).Exists(id)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -155,7 +155,7 @@ func (c *MediaAnnotationController) setStar(ctx context.Context, star bool, ids
|
|||||||
}
|
}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
exist, err = c.ds.Artist(ctx).Exists(id)
|
exist, err = tx.Artist(ctx).Exists(id)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user