Skip to content

Commit

Permalink
Merge pull request #522 from NASA-IMPACT/521-remove-has_sinequa_confi…
Browse files Browse the repository at this point in the history
…g-because-it-is-outdated

Remove has_sinequa_config boolean
  • Loading branch information
code-geek authored Nov 26, 2023
2 parents d03d2da + 609552b commit d34c470
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -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",
),
]
4 changes: 0 additions & 4 deletions sde_collections/models/collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@ <h1>{{ collection.name }}</h1>
<tr>
<th>Sinequa Configuration</th>
<td>
{% if collection.has_sinequa_config %}
<a href="{{ collection.sinequa_configuration }}" target="_blank">{{ collection.sinequa_configuration }}</a>
{% endif %}
<a href="{{ collection.sinequa_configuration }}" target="_blank">{{ collection.sinequa_configuration }}</a>
</td>
</tr>
<tr>
Expand Down

0 comments on commit d34c470

Please sign in to comment.