Chore: Fix fetching the General folder when nested folders is set and improve error handling (#62951)

* Nested folders: Modify Get() not to fail fetching the General folder

* Add test
This commit is contained in:
Sofia Papagiannaki
2023-02-08 17:16:53 +02:00
committed by GitHub
parent 4181acec72
commit 225c8dbba7
3 changed files with 39 additions and 3 deletions
+6
View File
@@ -42,6 +42,12 @@ type Folder struct {
HasACL bool
}
var GeneralFolder = Folder{ID: 0, Title: "General"}
func (f *Folder) IsGeneral() bool {
return f.ID == GeneralFolder.ID && f.Title == GeneralFolder.Title
}
type FolderDTO struct {
Folder