Removes useless and case sensitive check (#8352)

That check was useless because we use a int.TryParse. Morevoer queryString.AllKeys.Contains() is case sensitive.
This commit is contained in:
Hermes Sbicego
2020-04-23 19:11:07 +02:00
committed by GitHub
parent 914b5f8391
commit 8a327cf887

View File

@@ -72,12 +72,9 @@ namespace Orchard.CustomForms.Controllers {
var customForm = form.As<CustomFormPart>(); var customForm = form.As<CustomFormPart>();
// Retrieve the id of the content to edit // Retrieve the id of the content to edit
int contentId = 0;
var queryString = Services.WorkContext.HttpContext.Request.QueryString; var queryString = Services.WorkContext.HttpContext.Request.QueryString;
if (queryString.AllKeys.Contains("contentId")) { int.TryParse(queryString["contentId"], out int contentId);
int.TryParse(queryString["contentId"], out contentId);
}
ContentItem contentItem; ContentItem contentItem;
if (contentId > 0) { if (contentId > 0) {