From a965f26d48c8cff57af2a619b2ad498827e1fc0b Mon Sep 17 00:00:00 2001 From: moanos Date: Tue, 31 Dec 2024 11:38:52 +0100 Subject: [PATCH] fix: use Sex choices with all --- ...ion_adoptionnoticenotification_and_more.py | 22 +++++++++++++++++++ src/fellchensammlung/models.py | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 src/fellchensammlung/migrations/0029_rename_andoptionnoticenotification_adoptionnoticenotification_and_more.py diff --git a/src/fellchensammlung/migrations/0029_rename_andoptionnoticenotification_adoptionnoticenotification_and_more.py b/src/fellchensammlung/migrations/0029_rename_andoptionnoticenotification_adoptionnoticenotification_and_more.py new file mode 100644 index 0000000..a9be857 --- /dev/null +++ b/src/fellchensammlung/migrations/0029_rename_andoptionnoticenotification_adoptionnoticenotification_and_more.py @@ -0,0 +1,22 @@ +# Generated by Django 5.1.4 on 2024-12-31 10:37 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('fellchensammlung', '0028_searchsubscription'), + ] + + operations = [ + migrations.RenameModel( + old_name='AndoptionNoticeNotification', + new_name='AdoptionNoticeNotification', + ), + migrations.AlterField( + model_name='searchsubscription', + name='sex', + field=models.CharField(choices=[('F', 'Weiblich'), ('M', 'Männlich'), ('M_N', 'Männlich, kastriert'), ('F_N', 'Weiblich Kastriert'), ('I', 'Intergeschlechtlich'), ('A', 'Alle')], max_length=20), + ), + ] diff --git a/src/fellchensammlung/models.py b/src/fellchensammlung/models.py index 8c032b4..4ff3ab6 100644 --- a/src/fellchensammlung/models.py +++ b/src/fellchensammlung/models.py @@ -560,7 +560,7 @@ class SearchSubscription(models.Model): """ owner = models.ForeignKey(User, on_delete=models.CASCADE) location = models.ForeignKey(Location, on_delete=models.PROTECT) - sex = models.CharField(max_length=20, choices=SexChoices.choices) + sex = models.CharField(max_length=20, choices=SexChoicesWithAll.choices) radius = models.IntegerField(choices=DistanceChoices.choices) def __str__(self):