fix
This commit is contained in:
parent
65299269c4
commit
7b6cb56066
@ -156,7 +156,7 @@ impl<SDB: for<'conn> ISqlDatabaseBackend<'conn>> IDatabase for SqlDatabase<SDB>
|
|||||||
|
|
||||||
let version = tx
|
let version = tx
|
||||||
.select_database_version()?
|
.select_database_version()?
|
||||||
.ok_or_else(|| LoadError::SerDeError(String::from("missing database version")))?;
|
.ok_or_else(|| Error::SerDeError(String::from("missing database version")))?;
|
||||||
|
|
||||||
let database = match version.as_str() {
|
let database = match version.as_str() {
|
||||||
V20250103 => {
|
V20250103 => {
|
||||||
@ -164,14 +164,10 @@ impl<SDB: for<'conn> ISqlDatabaseBackend<'conn>> IDatabase for SqlDatabase<SDB>
|
|||||||
for artist in coll.iter_mut() {
|
for artist in coll.iter_mut() {
|
||||||
artist.albums.extend(tx.select_artist_albums(&artist.name)?);
|
artist.albums.extend(tx.select_artist_albums(&artist.name)?);
|
||||||
}
|
}
|
||||||
DeserializeDatabase::V20250103(coll)
|
Ok(DeserializeDatabase::V20250103(coll))
|
||||||
}
|
}
|
||||||
s => {
|
s => Err(Error::SerDeError(format!("unknown database version: {s}"))),
|
||||||
return Err(LoadError::SerDeError(format!(
|
}?;
|
||||||
"unknown database version: {s}"
|
|
||||||
)))
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
tx.commit()?;
|
tx.commit()?;
|
||||||
Ok(database.into())
|
Ok(database.into())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user