diff --git a/src/fellchensammlung/migrations/0008_alter_adoptionnoticestatus_minor_status_and_more.py b/src/fellchensammlung/migrations/0008_alter_adoptionnoticestatus_minor_status_and_more.py new file mode 100644 index 0000000..ed7c1d9 --- /dev/null +++ b/src/fellchensammlung/migrations/0008_alter_adoptionnoticestatus_minor_status_and_more.py @@ -0,0 +1,23 @@ +# Generated by Django 5.1.1 on 2024-10-10 14:14 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('fellchensammlung', '0007_alter_adoptionnotice_last_checked'), + ] + + operations = [ + migrations.AlterField( + model_name='adoptionnoticestatus', + name='minor_status', + field=models.CharField(choices=[('searching', 'searching'), ('interested', 'interested'), ('waiting_for_review', 'waiting_for_review'), ('needs_additional_info', 'needs_additional_info'), ('successful_with_notfellchen', 'successful_with_notfellchen'), ('successful_without_notfellchen', 'successful_without_notfellchen'), ('animal_died', 'animal_died'), ('closed_for_other_adoption_notice', 'closed_for_other_adoption_notice'), ('not_open_for_adoption_anymore', 'not_open_for_adoption_anymore'), ('other', 'other'), ('against_the_rules', 'against_the_rules'), ('missing_information', 'missing_information'), ('technical_error', 'technical_error'), ('unchecked', 'unchecked')], max_length=200), + ), + migrations.AlterField( + model_name='announcement', + name='publish_start_time', + field=models.DateTimeField(verbose_name='Veröffentlichungszeitpunkt'), + ), + ] diff --git a/src/fellchensammlung/models.py b/src/fellchensammlung/models.py index 7075826..d508630 100644 --- a/src/fellchensammlung/models.py +++ b/src/fellchensammlung/models.py @@ -330,6 +330,7 @@ class AdoptionNoticeStatus(models.Model): "against_the_rules": "against_the_rules", "missing_information": "missing_information", "technical_error": "technical_error", + "unchecked": "unchecked", "other": "other" } } @@ -357,6 +358,11 @@ class AdoptionNoticeStatus(models.Model): self.minor_status = self.MINOR_STATUS_CHOICES[self.CLOSED]["other"] self.save() + def deactivate_unchecked(self): + self.major_status = self.MAJOR_STATUS_CHOICES[self.DISABLED] + self.minor_status = self.MINOR_STATUS_CHOICES[self.DISABLED]["unchecked"] + self.save() + class Animal(models.Model): MALE_NEUTERED = "M_N"