From c4a6b3b7efb0b26b6fa147038e5d6ab02f638758 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Sat, 24 Feb 2018 14:32:48 -0500 Subject: [PATCH] idGuid variable --- src/Api/Controllers/CiphersController.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Api/Controllers/CiphersController.cs b/src/Api/Controllers/CiphersController.cs index b8cad27649..792f97fac8 100644 --- a/src/Api/Controllers/CiphersController.cs +++ b/src/Api/Controllers/CiphersController.cs @@ -420,8 +420,9 @@ namespace Bit.Api.Controllers { ValidateAttachment(); + var idGuid = new Guid(id); var userId = _userService.GetProperUserId(User).Value; - var cipher = await _cipherRepository.GetDetailsByIdAsync(new Guid(id)); + var cipher = await _cipherRepository.GetDetailsByIdAsync(idGuid); if(cipher == null || !cipher.OrganizationId.HasValue || !_currentContext.OrganizationAdmin(cipher.OrganizationId.Value)) {