pinakes-core: use InvalidOperation for nil media_id in upsert_book_metadata
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I72a80731d926b79660abf20c2c766e8c6a6a6964
This commit is contained in:
parent
185e3b562a
commit
91123fc90e
1 changed files with 1 additions and 1 deletions
|
|
@ -5089,7 +5089,7 @@ impl StorageBackend for SqliteBackend {
|
||||||
metadata: &crate::model::BookMetadata,
|
metadata: &crate::model::BookMetadata,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
if metadata.media_id.0.is_nil() {
|
if metadata.media_id.0.is_nil() {
|
||||||
return Err(PinakesError::Database(
|
return Err(PinakesError::InvalidOperation(
|
||||||
"upsert_book_metadata: media_id must not be nil".to_string(),
|
"upsert_book_metadata: media_id must not be nil".to_string(),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue