Fixup areas expecting VehicleId
This commit is contained in:
@@ -63,6 +63,7 @@ namespace MileageTraker.Web.Controllers
|
||||
throw new SecurityException();
|
||||
viewModel.SetProperties(log);
|
||||
|
||||
log.Vehicle = DataService.GetVehicle(viewModel.VehicleId);
|
||||
if (viewModel.Purpose != null)
|
||||
log.Purpose =
|
||||
DataService.GetPurposeTypes()
|
||||
@@ -107,6 +108,7 @@ namespace MileageTraker.Web.Controllers
|
||||
|
||||
// Save the new log
|
||||
var log = model.GetLog();
|
||||
log.Vehicle = DataService.GetVehicle(model.VehicleId);
|
||||
log.User = DataService.FindUserByUsername(User.Identity.Name);
|
||||
log.Source = HttpContext.Request.Url.AbsolutePath;
|
||||
log.UserHostAddress = HttpContext.Request.UserHostAddress;
|
||||
|
||||
Reference in New Issue
Block a user