diff --git a/src/scaffoldfitter/fitter.py b/src/scaffoldfitter/fitter.py index f5495bd..2b63951 100644 --- a/src/scaffoldfitter/fitter.py +++ b/src/scaffoldfitter/fitter.py @@ -375,7 +375,7 @@ def _discoverDataCoordinatesField(self): field = None if self._dataCoordinatesFieldName: field = self._fieldmodule.findFieldByName(self._dataCoordinatesFieldName) - else: + if not ((field) and field.isValid()): datapoints = self._fieldmodule.findNodesetByFieldDomainType(Field.DOMAIN_TYPE_DATAPOINTS) datapoint = datapoints.createNodeiterator().next() if datapoint.isValid():