(cherry picked from commit e13e6a7bd7)
Co-authored-by: ying-jeanne <74549700+ying-jeanne@users.noreply.github.com>
This commit is contained in:
1 parent
e4a85fb951
commit
9d6491be4f
2 files changed
+12
No files matched your search
@@ -692,9 +692,15 @@ func (l *LibraryElementService) deleteLibraryElementsInFolderUID(c context.Conte
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if len(folderUIDs) == 0 {
|
||||
return models.ErrFolderNotFound
|
||||
}
|
||||
|
||||
if len(folderUIDs) != 1 {
|
||||
return fmt.Errorf("found %d folders, while expecting at most one", len(folderUIDs))
|
||||
}
|
||||
|
||||
folderID := folderUIDs[0].ID
|
||||
|
||||
if err := l.requirePermissionsOnFolder(c, signedInUser, folderID); err != nil {
|
||||
|
||||
Reference in new issue
Block a user