1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 15:20:48 -05:00

more alias changes :(

fix flag penalty coming from wrong user
This commit is contained in:
RaidMax
2019-01-02 18:32:39 -06:00
parent 5a1525835a
commit da3259cb36
7 changed files with 144 additions and 167 deletions

View File

@ -18,10 +18,6 @@ namespace SharedLibraryCore.Services
{
using (var context = new DatabaseContext())
{
context.ChangeTracker.AutoDetectChangesEnabled = true;
context.ChangeTracker.LazyLoadingEnabled = true;
context.ChangeTracker.QueryTrackingBehavior = QueryTrackingBehavior.TrackAll;
// make bans propogate to all aliases
if (newEntity.Type == Penalty.PenaltyType.Ban)
{
@ -95,7 +91,7 @@ namespace SharedLibraryCore.Services
IsEvadedOffense = newEntity.IsEvadedOffense
};
newEntity.Offender.ReceivedPenalties.Add(penalty);
newEntity.Offender.ReceivedPenalties?.Add(penalty);
context.Penalties.Add(penalty);
}