From d00eb41f09fe349d2365adf604f4176b7b5c03fd Mon Sep 17 00:00:00 2001 From: Richard Christie Date: Mon, 10 May 2021 16:49:56 +1200 Subject: [PATCH] Fix discover data coordinates field --- src/scaffoldfitter/fitter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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():