lib/model: Return paused summary instead of error on paused folders (#6272)

This commit is contained in:
Simon Frei 2020-01-17 09:30:00 +01:00 committed by Jakob Borg
parent e782bab9fc
commit 39891cdf42
1 changed files with 2 additions and 2 deletions

View File

@ -78,8 +78,8 @@ func (c *folderSummaryService) Summary(folder string) (map[string]interface{}, e
var res = make(map[string]interface{})
errors, err := c.model.FolderErrors(folder)
if err != nil && err != ErrFolderPaused {
// Stats from the db can still be obtained if the folder is just paused
if err != nil && err != ErrFolderPaused && err != errFolderNotRunning {
// Stats from the db can still be obtained if the folder is just paused/being started
return nil, err
}
res["errors"] = len(errors)