possible audit log fix

This commit is contained in:
Daniel Balk
2023-04-14 18:32:50 +02:00
parent ad2be499db
commit 227ad493b7
3 changed files with 12 additions and 3 deletions

View File

@@ -73,8 +73,11 @@ public class AuditLogService
{ {
private List<LogData> Data = new List<LogData>(); private List<LogData> Data = new List<LogData>();
public void Add<T>(object data) public void Add<T>(object? data)
{ {
if(data == null)
return;
Data.Add(new LogData() Data.Add(new LogData()
{ {
Type = typeof(T), Type = typeof(T),

View File

@@ -98,8 +98,11 @@ public class ErrorLogService
{ {
private List<LogData> Data = new List<LogData>(); private List<LogData> Data = new List<LogData>();
public void Add<T>(object data) public void Add<T>(object? data)
{ {
if(data == null)
return;
Data.Add(new LogData() Data.Add(new LogData()
{ {
Type = typeof(T), Type = typeof(T),

View File

@@ -72,8 +72,11 @@ public class SecurityLogService
{ {
private List<LogData> Data = new List<LogData>(); private List<LogData> Data = new List<LogData>();
public void Add<T>(object data) public void Add<T>(object? data)
{ {
if(data == null)
return;
Data.Add(new LogData() Data.Add(new LogData()
{ {
Type = typeof(T), Type = typeof(T),