Handle nullability
This commit is contained in:
parent
72cf566049
commit
f072749c0a
|
@ -86,7 +86,10 @@ public class Database
|
||||||
var tableToReturn = _tables.Find(x => x.Name == table);
|
var tableToReturn = _tables.Find(x => x.Name == table);
|
||||||
var row = tableToReturn?.Rows?.FirstOrDefault(x => x.Columns?.FirstOrDefault(y => y.Name == key)?.Name == key);
|
var row = tableToReturn?.Rows?.FirstOrDefault(x => x.Columns?.FirstOrDefault(y => y.Name == key)?.Name == key);
|
||||||
var column = row?.Columns?.FirstOrDefault(x => x.Name == key);
|
var column = row?.Columns?.FirstOrDefault(x => x.Name == key);
|
||||||
column.Value = value;
|
|
||||||
|
if (column != null)
|
||||||
|
column.Value = value;
|
||||||
|
|
||||||
Save();
|
Save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue