-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Skip dimension check on geometric error #1435
Conversation
@@ -68,7 +76,7 @@ public DataSetToDataRepositoryMappingResult ConvertImportDataSet(ImportedDataSet | |||
private bool convertParsedDataColumnAndReturnWarningFlag(DataRepository dataRepository, KeyValuePair<ExtendedColumn, IList<SimulationPoint>> columnAndData, string fileName) | |||
{ | |||
DataColumn dataColumn; | |||
var unit = columnAndData.Value.FirstOrDefault(x => !string.IsNullOrEmpty(x.Unit)).Unit; | |||
var unit = columnAndData.Value.FirstOrDefault(x => !string.IsNullOrEmpty(x.Unit))?.Unit ?? _dimensionFactory.NoDimension.DefaultUnit.Name; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is c constant for it to be used instead
Constant.Dimension.NoDimension
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment. Use constant instead of injecting dimensionFactory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed required here
@@ -68,7 +69,7 @@ public DataSetToDataRepositoryMappingResult ConvertImportDataSet(ImportedDataSet | |||
private bool convertParsedDataColumnAndReturnWarningFlag(DataRepository dataRepository, KeyValuePair<ExtendedColumn, IList<SimulationPoint>> columnAndData, string fileName) | |||
{ | |||
DataColumn dataColumn; | |||
var unit = columnAndData.Value.FirstOrDefault(x => !string.IsNullOrEmpty(x.Unit)).Unit; | |||
var unit = columnAndData.Value.FirstOrDefault(x => !string.IsNullOrEmpty(x.Unit))?.Unit ?? Constants.Dimension.DIMENSIONLESS; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dimensionless is a dimension not a unit
I meant to use NO_DIMENSION to match the code that you had before
NO_DIMENSION.DefaultUnit or sthg kike this
Fixes #1425