Skip to content

Commit ccacc18

Browse files
authored
Merge pull request #11933 from owncloud/feat/OCISDEV-578
fix: fix the error handling for empty name on space update
2 parents 0d23561 + 0b6bd5e commit ccacc18

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Bugfix: Fix the error handling for empty name on space update
2+
3+
Fix the error handling for empty name on space update.
4+
5+
https://github.com/owncloud/ocis/pull/11933
6+
https://github.com/owncloud/ocis/issues/11887

services/graph/pkg/service/v0/drives.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ func (g Graph) updateDrive(w http.ResponseWriter, r *http.Request, apiVersion AP
574574
}
575575
}
576576

577-
if drive.GetName() != "" {
577+
if _, ok := drive.GetNameOk(); ok {
578578
spacename := strings.TrimSpace(drive.GetName())
579579
if err := validateSpaceName(spacename); err != nil {
580580
logger.Info().Err(err).Msg("could not update drive: spacename invalid")

tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -401,9 +401,6 @@ The expected failures in this file are from features in the owncloud/ocis repo.
401401
- [apiGraphUser/getUser.feature:696](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphUser/getUser.feature#L696)
402402
- [apiGraphUser/getUser.feature:700](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphUser/getUser.feature#L700)
403403

404-
#### [PATCH /v1.0/drives/{drive-id} accepts empty name](https://github.com/owncloud/ocis/issues/11887)
405-
406-
- [apiSpaces/changeSpaces.feature:603](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/changeSpaces.feature#L603)
407404

408405
Note: always have an empty line at the end of this file.
409406
The bash script that processes this file requires that the last line has a newline on the end.

0 commit comments

Comments
 (0)