Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

APR-2909-PRG pattern in RoatpAppealsController without modelstate #934

Merged

Conversation

raviudari01
Copy link
Contributor

No description provided.

@@ -140,7 +136,7 @@ public async Task<IActionResult> GroundsOfAppeal(GroundsOfAppealViewModel model)

if (!ModelState.IsValid)
{
return RedirectToAction("GroundsOfAppeal", new { model.ApplicationId, model.AppealOnPolicyOrProcesses, model.AppealOnEvidenceSubmitted });
return View("~/Views/Appeals/GroundsOfAppeal.cshtml", model);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to populate appeals file list in the model here, see the GET method. Refactor the model building logic in the GET method so it can be reused here.

Copy link
Contributor Author

@raviudari01 raviudari01 Jan 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refactored the code, but calling model build method is not required in the post as it is retaining the removed file

@sonarcloud
Copy link

sonarcloud bot commented Jan 7, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@DevenKShah DevenKShah merged commit e33d221 into master Jan 17, 2022
@DevenKShah DevenKShah deleted the APR-2909-PRG-Pattern-ModelState-RoatpAppealsController branch January 17, 2022 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants