Fix /api/orphans with removed parent nodes

This commit is contained in:
Přemysl Eric Janouch 2024-12-29 14:17:07 +01:00
parent ce2e58b6bc
commit 0530c5d95f
Signed by: p
GPG Key ID: A0420B94F92B9493

View File

@ -658,7 +658,9 @@ func getOrphanReplacement(webPath string) (*webOrphanImage, error) {
}
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
}