Merge pull request #26059 from nextcloud/backport/25911/stable20

[stable20] Only clear share password model when actually saved
This commit is contained in:
Christoph Wurst 2021-03-15 09:48:19 +01:00 committed by GitHub
commit 3e18eca7a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 4 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -248,11 +248,14 @@ export default {
try {
await this.updateShare(this.share.id, properties)
if (propertyNames.indexOf('password') >= 0) {
// reset password state after sync
this.$delete(this.share, 'newPassword')
}
// clear any previous errors
this.$delete(this.errors, propertyNames[0])
// reset password state after sync
this.$delete(this.share, 'newPassword')
} catch ({ message }) {
if (message && message !== '') {
this.onSyncError(propertyNames[0], message)