Get to compile

This commit is contained in:
2015-10-02 10:45:25 -04:00
parent a2368f5e69
commit 0a90d48f2d
7 changed files with 30 additions and 36 deletions
+2 -1
View File
@@ -243,6 +243,7 @@ namespace MileageTraker.Web.Controllers
}
var log = viewModel.GetLog();
log.Vehicle = DataService.GetVehicle(viewModel.VehicleId);
log.User = DataService.FindUserByUsername(User.Identity.Name);
log.Source = HttpContext.Request.Url.AbsolutePath;
log.UserHostAddress = HttpContext.Request.UserHostAddress;
@@ -266,7 +267,7 @@ namespace MileageTraker.Web.Controllers
}, JsonRequestBehavior.AllowGet);
}
// verify vehicle exists
if (DataService.GetVehicle(log.VehicleId) == null)
if (log.Vehicle == null)
{
return Json(new
{