feat: Allow excluding rescue org from checking

This commit is contained in:
2025-06-19 23:33:48 +02:00
parent 1307b2ff7b
commit a302a36fd4
3 changed files with 22 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
# Generated by Django 5.2.1 on 2025-06-19 21:26
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('fellchensammlung', '0048_alter_adoptionnotice_further_information'),
]
operations = [
migrations.AddField(
model_name='rescueorganization',
name='exclude_from_check',
field=models.BooleanField(default=False, help_text='Organisation von der manuellen Überprüfung ausschließen, z.B. weil Tiere nicht online geführt werden', verbose_name='Von Prüfung ausschließen'),
),
]

View File

@@ -150,6 +150,9 @@ class RescueOrganization(models.Model):
external_source_identifier = models.CharField(max_length=200, null=True, blank=True,
choices=ExternalSourceChoices.choices,
verbose_name=_('External Source Identifier'))
exclude_from_check = models.BooleanField(default=False, verbose_name=_('Von Prüfung ausschließen'),
help_text=_("Organisation von der manuellen Überprüfung ausschließen, "
"z.B. weil Tiere nicht online geführt werden"))
class Meta:
unique_together = ('external_object_identifier', 'external_source_identifier',)

View File

@@ -712,7 +712,7 @@ def rescue_organization_check(request):
if action == "checked":
rescue_org.set_checked()
last_checked_rescue_orgs = RescueOrganization.objects.order_by("last_checked")
last_checked_rescue_orgs = RescueOrganization.objects.filter(exclude_from_check=False).order_by("last_checked")
context = {"rescue_orgs": last_checked_rescue_orgs, }
return render(request, 'fellchensammlung/rescue-organization-check.html', context=context)