From 609552b4c4cc7cb80b1e39ad90fa086b3fb12976 Mon Sep 17 00:00:00 2001 From: Ashish Acharya Date: Sun, 26 Nov 2023 11:34:48 -0600 Subject: [PATCH] Remove has_sinequa_config boolean --- .../0037_remove_collection_has_sinequa_config.py | 16 ++++++++++++++++ sde_collections/models/collection.py | 4 ---- .../sde_collections/collection_detail.html | 4 +--- 3 files changed, 17 insertions(+), 7 deletions(-) create mode 100644 sde_collections/migrations/0037_remove_collection_has_sinequa_config.py diff --git a/sde_collections/migrations/0037_remove_collection_has_sinequa_config.py b/sde_collections/migrations/0037_remove_collection_has_sinequa_config.py new file mode 100644 index 00000000..d87772b6 --- /dev/null +++ b/sde_collections/migrations/0037_remove_collection_has_sinequa_config.py @@ -0,0 +1,16 @@ +# Generated by Django 4.2.6 on 2023-11-26 17:34 + +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ("sde_collections", "0036_candidateurl_present_on_prod_and_more"), + ] + + operations = [ + migrations.RemoveField( + model_name="collection", + name="has_sinequa_config", + ), + ] diff --git a/sde_collections/models/collection.py b/sde_collections/models/collection.py index 98ecc46f..9c91c6d4 100644 --- a/sde_collections/models/collection.py +++ b/sde_collections/models/collection.py @@ -91,7 +91,6 @@ class Collection(models.Model): User, on_delete=models.DO_NOTHING, null=True, blank=True ) curation_started = models.DateTimeField("Curation Started", null=True, blank=True) - has_sinequa_config = models.BooleanField(default=True) class Meta: """Meta definition for Collection.""" @@ -290,8 +289,6 @@ def candidate_urls_count(self) -> int: @property def sinequa_configuration(self) -> str: - if not self.has_sinequa_config: - return "" return f"https://github.com/NASA-IMPACT/sde-backend/blob/master/sources/SDE/{self.config_folder}/default.xml" @property @@ -366,7 +363,6 @@ def sync_with_production_webapp(self) -> None: self.division = response_json["division"] self.document_type = response_json["document_type"] self.github_issue_number = response_json["github_issue_number"] - self.has_sinequa_config = response_json["has_sinequa_config"] self.name = response_json["name"] self.new_collection = response_json["new_collection"] self.notes = response_json["notes"] diff --git a/sde_indexing_helper/templates/sde_collections/collection_detail.html b/sde_indexing_helper/templates/sde_collections/collection_detail.html index 23f32786..de360fd1 100644 --- a/sde_indexing_helper/templates/sde_collections/collection_detail.html +++ b/sde_indexing_helper/templates/sde_collections/collection_detail.html @@ -55,9 +55,7 @@

{{ collection.name }}

Sinequa Configuration - {% if collection.has_sinequa_config %} - {{ collection.sinequa_configuration }} - {% endif %} + {{ collection.sinequa_configuration }}