Also remove "false positive" authors
If PB adds an author who doesn't have the "aut"-role, make sure to remove this false-positive entry
This commit is contained in:
parent
a52b8a8288
commit
624987326d
3 changed files with 5 additions and 3 deletions
|
@ -196,7 +196,9 @@ fn fix_db_entries(tx: &Transaction, book_entries: &Vec<BookEntry>) -> Statistics
|
|||
.iter()
|
||||
.map(|aut| aut.name.clone())
|
||||
.collect::<Vec<_>>();
|
||||
if !authornames.iter().all(|s| entry.author.contains(s)) {
|
||||
if !authornames.iter().all(|s| entry.author.contains(s))
|
||||
|| authornames.join(", ").len() != entry.author.len()
|
||||
{
|
||||
let mut stmt = tx
|
||||
.prepare("UPDATE books_impl SET author = :authors WHERE id = :book_id")
|
||||
.unwrap();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue