From 2fb7a1feebb6b8a2c524c75e688cec00d4e3d50e Mon Sep 17 00:00:00 2001 From: Julius Härtl Date: Wed, 8 Jun 2022 23:01:48 +0200 Subject: Fix adding to empty attributes and duplicate request MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- apps/files_sharing/src/components/SharingEntry.vue | 3 +-- apps/files_sharing/src/models/Share.js | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'apps/files_sharing/src') diff --git a/apps/files_sharing/src/components/SharingEntry.vue b/apps/files_sharing/src/components/SharingEntry.vue index e4754b86f4f..0eb0029cb54 100644 --- a/apps/files_sharing/src/components/SharingEntry.vue +++ b/apps/files_sharing/src/components/SharingEntry.vue @@ -428,9 +428,8 @@ export default { this.share.permissions = permissions if (this.share.hasDownloadPermission !== isDownloadChecked) { this.share.hasDownloadPermission = isDownloadChecked - this.queueUpdate('attributes') } - this.queueUpdate('permissions') + this.queueUpdate('permissions', 'attributes') }, /** diff --git a/apps/files_sharing/src/models/Share.js b/apps/files_sharing/src/models/Share.js index 0e96987c005..e6512c67f8c 100644 --- a/apps/files_sharing/src/models/Share.js +++ b/apps/files_sharing/src/models/Share.js @@ -50,6 +50,7 @@ export default class Share { console.warn('Could not parse share attributes returned by server: "' + ocsData.attributes + '"') } } + ocsData.attributes = ocsData.attributes ?? [] // store state this._share = ocsData -- cgit v1.2.3