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:
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user