1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-01 16:12:49 -05:00

fix bugs around collection association

This commit is contained in:
Kyle Spearrin
2017-08-30 18:18:39 -04:00
parent 5021b71463
commit 770fa10f3e
6 changed files with 230 additions and 36 deletions

View File

@ -338,7 +338,11 @@ namespace Bit.Core.Services
cipher.UserId = sharingUserId;
cipher.OrganizationId = organizationId;
cipher.RevisionDate = DateTime.UtcNow;
await _cipherRepository.ReplaceAsync(cipher, collectionIds);
if(!await _cipherRepository.ReplaceAsync(cipher, collectionIds))
{
throw new BadRequestException("Unable to save.");
}
updatedCipher = true;
if(hasAttachments)