diff options
| author | Přemysl Eric Janouch <p@janouch.name> | 2024-12-29 14:17:07 +0100 | 
|---|---|---|
| committer | Přemysl Eric Janouch <p@janouch.name> | 2024-12-29 14:17:07 +0100 | 
| commit | 0530c5d95fde2b77fcae29a7cfa08bb75da4f5a5 (patch) | |
| tree | 298681209188093ff384c19a0cf3ddc1f03d2616 | |
| parent | ce2e58b6bcdef7616d5426f3310ab09cdea92f32 (diff) | |
| download | gallery-0530c5d95fde2b77fcae29a7cfa08bb75da4f5a5.tar.gz gallery-0530c5d95fde2b77fcae29a7cfa08bb75da4f5a5.tar.xz gallery-0530c5d95fde2b77fcae29a7cfa08bb75da4f5a5.zip | |
Fix /api/orphans with removed parent nodes
| -rw-r--r-- | main.go | 4 | 
1 files changed, 3 insertions, 1 deletions
| @@ -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  	} | 
