From bddb832e045228535672143fda974b1b91eb06b3 Mon Sep 17 00:00:00 2001 From: Juliana Trevine <44185775+trevineju@users.noreply.github.com> Date: Fri, 1 Nov 2024 01:23:27 -0300 Subject: [PATCH 1/2] =?UTF-8?q?Adiciona=20verifica=C3=A7=C3=A3o=20de=20pre?= =?UTF-8?q?senta=20de=20allowed=5Fdomains=20em=20BaseGazetteSpider?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juliana Trevine <44185775+trevineju@users.noreply.github.com> --- data_collection/gazette/spiders/base/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/data_collection/gazette/spiders/base/__init__.py b/data_collection/gazette/spiders/base/__init__.py index 4363cb282..b07da1264 100644 --- a/data_collection/gazette/spiders/base/__init__.py +++ b/data_collection/gazette/spiders/base/__init__.py @@ -19,7 +19,10 @@ def __init__(self, start_date="", end_date="", *args, **kwargs): if not hasattr(self, "TERRITORY_ID"): raise NotConfigured("Please set a value for `TERRITORY_ID`") - + + if not hasattr(self, "allowed_domains"): + raise NotConfigured("Please set a value for `allowed_domains`) + if start_date: try: self.start_date = datetime.strptime(start_date, "%Y-%m-%d").date() From 26903eda736d8b75840525e0a25bd7071126ba32 Mon Sep 17 00:00:00 2001 From: Juliana Trevine <44185775+trevineju@users.noreply.github.com> Date: Fri, 1 Nov 2024 13:53:13 -0300 Subject: [PATCH 2/2] Update data_collection/gazette/spiders/base/__init__.py Co-authored-by: Gabriel Araujo Signed-off-by: Juliana Trevine <44185775+trevineju@users.noreply.github.com> --- data_collection/gazette/spiders/base/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data_collection/gazette/spiders/base/__init__.py b/data_collection/gazette/spiders/base/__init__.py index b07da1264..b9f47688b 100644 --- a/data_collection/gazette/spiders/base/__init__.py +++ b/data_collection/gazette/spiders/base/__init__.py @@ -21,7 +21,7 @@ def __init__(self, start_date="", end_date="", *args, **kwargs): raise NotConfigured("Please set a value for `TERRITORY_ID`") if not hasattr(self, "allowed_domains"): - raise NotConfigured("Please set a value for `allowed_domains`) + raise NotConfigured("Please set a value for `allowed_domains`") if start_date: try: