From 99df132cc7afc47aeaf9dd19109d40413c0397dc Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 30 Jul 2018 21:36:11 -0400 Subject: [PATCH] null checks --- src/Core/Models/Api/Request/CipherRequestModel.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Core/Models/Api/Request/CipherRequestModel.cs b/src/Core/Models/Api/Request/CipherRequestModel.cs index 023d7080f..95abdbc3b 100644 --- a/src/Core/Models/Api/Request/CipherRequestModel.cs +++ b/src/Core/Models/Api/Request/CipherRequestModel.cs @@ -157,7 +157,7 @@ namespace Bit.Core.Models.Api new string[] { nameof(Cipher.OrganizationId) }); } - if(!CollectionIds?.Any() ?? false) + if(!CollectionIds?.Any() ?? true) { yield return new ValidationResult("You must select at least one collection.", new string[] { nameof(CollectionIds) }); @@ -193,7 +193,7 @@ namespace Bit.Core.Models.Api public IEnumerable Validate(ValidationContext validationContext) { - if(!Ciphers?.Any() ?? false) + if(!Ciphers?.Any() ?? true) { yield return new ValidationResult("You must select at least one cipher.", new string[] { nameof(Ciphers) }); @@ -222,7 +222,7 @@ namespace Bit.Core.Models.Api } } - if(!CollectionIds?.Any() ?? false) + if(!CollectionIds?.Any() ?? true) { yield return new ValidationResult("You must select at least one collection.", new string[] { nameof(CollectionIds) });