summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkash-Sharma-1 <akashthegreatlegend@gmail.com>2020-05-23 23:11:26 +0530
committerAkash-Sharma-1 <akashthegreatlegend@gmail.com>2020-05-23 23:11:26 +0530
commit0f38064059658e216985eea4261150ddfe4bf04b (patch)
tree10616c7eaa1a8844389de1266beff1a52ade17a7
parent7c13f87a90579ae04227154fe583ba38ecde09be (diff)
downloadrdflib-0f38064059658e216985eea4261150ddfe4bf04b.tar.gz
Updated operators.py
-rw-r--r--rdflib/plugins/sparql/operators.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/rdflib/plugins/sparql/operators.py b/rdflib/plugins/sparql/operators.py
index a3e19e91..d06148ba 100644
--- a/rdflib/plugins/sparql/operators.py
+++ b/rdflib/plugins/sparql/operators.py
@@ -765,8 +765,7 @@ def AdditiveExpression(e, ctx):
# handling arithmetic(addition/subtraction) of dateTime, date, time
# and duration datatypes (if any)
- if hasattr(expr, 'datatype'):
- if(expr.datatype in XSD_DateTime_DTs or expr.datatype in XSD_Duration_DTs):
+ if hasattr(expr, 'datatype') and (expr.datatype in XSD_DateTime_DTs or expr.datatype in XSD_Duration_DTs):
res = dateTimeObjects(expr)
dt = expr.datatype