Commit 118fcff7 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Artists: Fix wrongly assumed failure

parent c9cb70d0
......@@ -190,8 +190,11 @@ bool Artist::createDefaultArtists( DBConnection dbConnection )
// This will skip the cache for those new entities, but they will be inserted soon enough anyway.
static const std::string req = "INSERT OR IGNORE INTO " + policy::ArtistTable::Name +
"(id_artist) VALUES(?),(?)";
return sqlite::Tools::executeInsert( dbConnection, req, medialibrary::UnknownArtistID,
sqlite::Tools::executeInsert( dbConnection, req, medialibrary::UnknownArtistID,
medialibrary::VariousArtistID );
// Always return true. The insertion might succeed, but we consider it a failure when 0 row
// gets inserted, while we are explicitely specifying "OR IGNORE" here.
return true;
}
std::shared_ptr<Artist> Artist::create( DBConnection dbConnection, const std::string &name )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment