From 4da172a94b776e69f0a782953c835b5b16ca7372 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Tue, 18 Apr 2017 09:51:38 -0400 Subject: [PATCH] limit update to available subvaults --- .../dbo/Stored Procedures/SubvaultCipher_UpdateSubvaults.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Sql/dbo/Stored Procedures/SubvaultCipher_UpdateSubvaults.sql b/src/Sql/dbo/Stored Procedures/SubvaultCipher_UpdateSubvaults.sql index 86f722195b..1795ba0e19 100644 --- a/src/Sql/dbo/Stored Procedures/SubvaultCipher_UpdateSubvaults.sql +++ b/src/Sql/dbo/Stored Procedures/SubvaultCipher_UpdateSubvaults.sql @@ -28,7 +28,8 @@ BEGIN ON [Target].[SubvaultId] = [Source].[Id] AND [Target].[CipherId] = @CipherId - WHEN NOT MATCHED BY TARGET THEN + WHEN NOT MATCHED BY TARGET + AND [Source].[Id] IN (SELECT [SubvaultId] FROM [AvailableSubvaultsCTE]) THEN INSERT VALUES ( [Source].[Id],