Skip to content
This repository has been archived by the owner on Apr 27, 2021. It is now read-only.

Commit

Permalink
VehicleHandler #12 - Make DoorState saving working.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruffo324 committed Feb 11, 2018
1 parent 4ff8689 commit 842ed01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions EvoMp/EvoMp.Module.VehicleHandler/Server/ExtendedVehicle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ public void Save()
context.Vehicles.Attach(_vehicle);
context.Vehicles.AddOrUpdate(Properties);
context.SaveChanges();
contextTransaction.Commit();

// Doorstates
if (Properties.DoorStates != null)
Expand All @@ -115,9 +114,10 @@ public void Save()
context.DoorStates.Attach(doorState);
context.DoorStates.AddOrUpdate(doorState);
context.SaveChanges();
contextTransaction.Commit();
}

contextTransaction.Commit();

// Save VehicleId to the Vehicle
if (!VehicleHandle.IsNull)
API.shared.setEntityData(VehicleHandle, "VehicleId", Properties.VehicleId);
Expand Down

0 comments on commit 842ed01

Please sign in to comment.