From 0530c5d95fde2b77fcae29a7cfa08bb75da4f5a5 Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch
Date: Sun, 29 Dec 2024 14:17:07 +0100 Subject: Fix /api/orphans with removed parent nodes --- main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 0eb7382..3afe941 100644 --- a/main.go +++ b/main.go @@ -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 } -- cgit v1.2.3-70-g09d2