-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DAM: Fix the duplicate name check when updating a file (v5) (#2065)
Backport of #2049
- Loading branch information
1 parent
e8fa938
commit 91b7343
Showing
3 changed files
with
18 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
"@comet/cms-api": patch | ||
"@comet/cms-admin": patch | ||
--- | ||
|
||
DAM: Fix the duplicate name check when updating a file | ||
|
||
Previously, there were two bugs: | ||
|
||
1. In the `EditFile` form, the `folderId` wasn't passed to the mutation | ||
2. In `FilesService#updateByEntity`, the duplicate check was always done against the root folder if no `folderId` was passed | ||
|
||
This caused an error when saving a file in any folder if there was another file with the same name in the root folder. | ||
And it was theoretically possible to create two files with the same name in one folder (though this was still prevented by admin-side validation). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters