mirror of
https://github.com/go-shiori/shiori.git
synced 2025-09-30 16:55:24 +08:00
fix(import): check for no rows error (#487)
This commit is contained in:
parent
09f2465065
commit
460014581c
1 changed files with 3 additions and 1 deletions
|
@ -1,6 +1,8 @@
|
|||
package cmd
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
|
@ -92,7 +94,7 @@ func importHandler(cmd *cobra.Command, args []string) {
|
|||
}
|
||||
|
||||
_, exist, err := db.GetBookmark(cmd.Context(), 0, url)
|
||||
if err != nil {
|
||||
if err != nil && !errors.Is(err, sql.ErrNoRows) {
|
||||
cError.Printf("Skip %s: Get Bookmark fail, %v", url, err)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue