Fix /api/orphans with removed parent nodes
This commit is contained in:
parent
ce2e58b6bc
commit
0530c5d95f
4
main.go
4
main.go
@ -658,7 +658,9 @@ func getOrphanReplacement(webPath string) (*webOrphanImage, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
parent, err := idForDirectoryPath(tx, path[:len(path)-1], false)
|
parent, err := idForDirectoryPath(tx, path[:len(path)-1], false)
|
||||||
if err != nil {
|
if errors.Is(err, sql.ErrNoRows) {
|
||||||
|
return nil, nil
|
||||||
|
} else if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user