Skip to content

Commit

Permalink
fix validating result and then redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
hamed-shirbandi committed Nov 3, 2021
1 parent 040158f commit 71e8c36
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Web/Areas/Admin/Controllers/OrganizationsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ public async Task<IActionResult> Create(OrganizationInputDto input)
{
input.OwnerMemberId = GetCurrentUserId();
var cmdResult = await _organizationService.CreateAsync(input);
return RedirectToAction(cmdResult, actionName:"index",controllerName:"dashboard");
if (!cmdResult.IsSuccess)
return View(cmdResult, input);

return RedirectToAction(actionName:"index",controllerName:"dashboard");
}


Expand Down

0 comments on commit 71e8c36

Please sign in to comment.