1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Server: Fixed bug when unsharing a notebook that has no recipients

This commit is contained in:
Laurent Cozic 2021-05-16 18:55:07 +02:00
parent f7d164be6e
commit 6ddb69e1ea

View File

@ -131,6 +131,7 @@ export default class ShareUserModel extends BaseModel<ShareUser> {
if (share.type !== ShareType.Folder) return;
const shareUsers = await this.byShareId(share.id, null);
if (!shareUsers.length) return;
await this.withTransaction(async () => {
await this.delete(shareUsers.map(s => s.id));