Don't reset share attributes when not specified

When not specified in the OCS call, don't reset the share attributes.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
pull/32482/head
Vincent Petry 2022-06-02 11:23:22 +07:00 committed by Carl Schwan
parent dbbc426f75
commit 54a0d8fe64
No known key found for this signature in database
GPG Key ID: C3AA6B3A5EFA7AC5
1 changed files with 6 additions and 2 deletions

@ -681,7 +681,9 @@ class ShareAPIController extends OCSController {
$share->setNote($note);
}
$share = $this->setShareAttributes($share, $attributes);
if ($attributes !== null) {
$share = $this->setShareAttributes($share, $attributes);
}
try {
$share = $this->shareManager->createShare($share);
@ -1228,7 +1230,9 @@ class ShareAPIController extends OCSController {
}
}
$share = $this->setShareAttributes($share, $attributes);
if ($attributes !== null) {
$share = $this->setShareAttributes($share, $attributes);
}
try {
$share = $this->shareManager->updateShare($share);