Fix error in Geometry by Expression

We can't depend on preparing the expression, as we may not have
enough context to do this during the algorithm preparation step
This commit is contained in:
Nyall Dawson 2017-11-22 16:46:39 +10:00
parent 59d55fc44c
commit 8775aff71b

View File

@ -94,11 +94,7 @@ class GeometryByExpression(QgisFeatureBasedAlgorithm):
return False
self.expression_context = self.createExpressionContext(parameters, context)
if not self.expression.prepare(self.expression_context):
feedback.reportErro(
self.tr('Evaluation error: {0}').format(self.expression.evalErrorString()))
return False
self.expression.prepare(self.expression_context)
return True