Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit e3cbe1ea authored by Michael KRISPER's avatar Michael KRISPER
Browse files

additional check for DBNull for P_aux

parent 123674d5
No related branches found
No related tags found
No related merge requests found
......@@ -81,7 +81,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
foreach (var kv in _powerDemands.Where(kv => !string.IsNullOrWhiteSpace(kv.Key))) {
container[kv.Key] = kv.Value;
}
if (container[ModalResultField.P_aux] == null) {
if (container[ModalResultField.P_aux] == null || container[ModalResultField.P_aux] == DBNull.Value) {
// don't overwrite if someone else already wrote the total aux power
container[ModalResultField.P_aux] = _powerDemands.Values.Sum(p => p);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment