Cleanup and fixes
This commit is contained in:
@@ -22,17 +22,13 @@ namespace MileageTraker.Web.Controllers
|
||||
[HttpPost]
|
||||
public ActionResult Index(CreateLogViewModel model)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
ViewBag.updateError = "Create Failure";
|
||||
if (model.LogType == null) // WTF why doesn't the model binder get this
|
||||
model.LogType = new MileageLogTypeWrapper();
|
||||
return View(model);
|
||||
var confirmCreateLogViewModel = new ConfirmCreateLogViewModel(model);
|
||||
return View("Confirm", confirmCreateLogViewModel);
|
||||
}
|
||||
|
||||
var confirmCreateLogViewModel = new ConfirmCreateLogViewModel(model);
|
||||
|
||||
return View("Confirm", confirmCreateLogViewModel);
|
||||
return View(model);
|
||||
}
|
||||
|
||||
[HttpParamAction]
|
||||
|
||||
Reference in New Issue
Block a user