From 912e81b5e80f669b93da060981700a7aa781eb77 Mon Sep 17 00:00:00 2001 From: Florian Knappers <73856313+JJFlorian@users.noreply.github.com> Date: Thu, 4 Apr 2024 14:24:38 +0200 Subject: [PATCH] added bro-demo env option in settings --- api/models.py | 2 +- api/tasks.py | 1 + brostar_api/settings.py | 14 ++++++++++---- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/api/models.py b/api/models.py index 2db4181..0913fa2 100644 --- a/api/models.py +++ b/api/models.py @@ -77,10 +77,10 @@ class UploadTask(models.Model): status = models.CharField( max_length=20, choices=choices.STATUS_CHOICES, default="PENDING", blank=True ) - bro_id = models.CharField(max_length=500, blank=True, null=True) log = models.TextField(blank=True) bro_errors = models.TextField(blank=True) progress = models.FloatField(blank=True, null=True) + bro_id = models.CharField(max_length=500, blank=True, null=True) def __str__(self) -> str: return f"{self.data_owner}: {self.registration_type} ({self.request_type})" diff --git a/api/tasks.py b/api/tasks.py index 9f312c8..52c9405 100644 --- a/api/tasks.py +++ b/api/tasks.py @@ -67,6 +67,7 @@ def upload_bro_data_task( # Update upload task instance upload_task_instance.bro_id = bro_id + upload_task_instance.progess = 100.0 upload_task_instance.status = "COMPLETED" upload_task_instance.log = "The upload was done successfully" upload_task_instance.save() diff --git a/brostar_api/settings.py b/brostar_api/settings.py index 9c13064..ddad28d 100644 --- a/brostar_api/settings.py +++ b/brostar_api/settings.py @@ -213,7 +213,13 @@ # SENTRY_DSN will only be set on staging/production, btw. sentry_sdk.init(dsn=SENTRY_DSN) -# BRO SETTINGS -BRO_UITGIFTE_SERVICE_URL = "https://publiek.broservices.nl" -BRONHOUDERSPORTAAL_URL = "https://acc.bronhouderportaal-bro.nl" -# BRONHOUDERSPORTAAL_URL = "https://www.bronhouderportaal-bro.nl" +# BRO SETTINGS: +BRO_DEMO_OMGEVING = True + +if BRO_DEMO_OMGEVING: + BRO_UITGIFTE_SERVICE_URL = "https://int-publiek.broservices.nl" + BRONHOUDERSPORTAAL_URL = "https://demo.bronhouderportaal-bro.nl" +else: + BRO_UITGIFTE_SERVICE_URL = "https://publiek.broservices.nl" + BRONHOUDERSPORTAAL_URL = "https://bronhouderportaal-bro.nl" + # BRONHOUDERSPORTAAL_URL = "https://www.bronhouderportaal-bro.nl"