mirror of
https://github.com/go-shiori/shiori.git
synced 2025-10-04 18:54:52 +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
|
package cmd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"database/sql"
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
@ -92,7 +94,7 @@ func importHandler(cmd *cobra.Command, args []string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
_, exist, err := db.GetBookmark(cmd.Context(), 0, url)
|
_, 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)
|
cError.Printf("Skip %s: Get Bookmark fail, %v", url, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue