diff --git a/lemarche/tenders/migrations/0078_tender_admins.py b/lemarche/tenders/migrations/0078_tender_admins.py new file mode 100644 index 000000000..905f00430 --- /dev/null +++ b/lemarche/tenders/migrations/0078_tender_admins.py @@ -0,0 +1,25 @@ +# Generated by Django 4.2.9 on 2024-03-04 13:32 + +from django.conf import settings +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ("tenders", "0077_alter_tender_siae_kind"), + ] + + operations = [ + migrations.AddField( + model_name="tender", + name="admins", + field=models.ManyToManyField( + blank=True, + help_text="Champ renseigné par un ADMIN", + related_name="tenders_admins", + to=settings.AUTH_USER_MODEL, + verbose_name="Admin(s) du besoin", + ), + ), + ] diff --git a/lemarche/tenders/models.py b/lemarche/tenders/models.py index cdc966730..89738054d 100644 --- a/lemarche/tenders/models.py +++ b/lemarche/tenders/models.py @@ -561,6 +561,14 @@ class Tender(models.Model): siae_list_last_seen_date = models.DateTimeField( "Date de dernière visite de l'auteur sur la page 'structures intéressées'", blank=True, null=True ) + + admins = models.ManyToManyField( + "users.User", + verbose_name="Admin(s) du besoin", + help_text=ADMIN_FIELD_HELP_TEXT, + related_name="tenders_admins", + blank=True, + ) logs = models.JSONField(verbose_name="Logs historiques", editable=False, default=list) source = models.CharField( verbose_name="Source",