Add required city field
This commit is contained in:
@@ -350,6 +350,16 @@ namespace MileageTraker.Web.Controllers
|
||||
Action = GetFixLink(viewModel)
|
||||
}, JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
// verify city exists
|
||||
if (DataService.FindCityByName(log.CityName) == null)
|
||||
{
|
||||
return Json(new
|
||||
{
|
||||
Status = ImportStatus.Failure.ToString(),
|
||||
Message = "City must exist in system",
|
||||
Action = GetFixLink(viewModel)
|
||||
}, JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
|
||||
// SAVE IT!
|
||||
DataService.AddLog(log);
|
||||
|
||||
Reference in New Issue
Block a user