From abc05a566ff09ef310924d0e951b66731478bdf2 Mon Sep 17 00:00:00 2001 From: Edward Oliveira Date: Fri, 21 Oct 2022 12:51:22 -0300 Subject: [PATCH] HOT-FIX: NoneType exception em LexML --- sapl/lexml/OAIServer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sapl/lexml/OAIServer.py b/sapl/lexml/OAIServer.py index 340c03dde..e23db808e 100644 --- a/sapl/lexml/OAIServer.py +++ b/sapl/lexml/OAIServer.py @@ -237,7 +237,8 @@ class OAIServer: return None def oai_query(self, offset=0, batch_size=10, from_=None, until=None, identifier=None): - from_ = timezone.make_aware(from_) # convert from naive to timezone aware datetime + if from_: + from_ = timezone.make_aware(from_) # convert from naive to timezone aware datetime esfera = self.get_esfera_federacao() offset = 0 if offset < 0 else offset batch_size = 10 if batch_size < 0 else batch_size