Skip to content

Commit

Permalink
Prefix archived fields with underscore
Browse files Browse the repository at this point in the history
  • Loading branch information
Guilouf committed Jan 9, 2025
1 parent fb0583b commit 9c4c1bd
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Generated by Django 4.2.15 on 2025-01-03 10:18

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("siaes", "0079_alter_historicalsiae_contact_social_website_and_more"),
]

operations = [
migrations.RemoveField(
model_name="historicalsiae",
name="is_cocontracting",
),
migrations.RemoveField(
model_name="siae",
name="is_cocontracting",
),
migrations.AddField(
model_name="historicalsiae",
name="_is_cocontracting",
field=models.BooleanField(default=False, verbose_name="Fonctionnalité désactivée"),
),
migrations.AddField(
model_name="siae",
name="_is_cocontracting",
field=models.BooleanField(default=False, verbose_name="Fonctionnalité désactivée"),
),
]
2 changes: 1 addition & 1 deletion lemarche/siaes/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ class Siae(models.Model):
logo_url = models.URLField(verbose_name="Lien vers le logo", max_length=500, blank=True)

is_consortium = models.BooleanField(verbose_name="Consortium", default=False)
is_cocontracting = models.BooleanField(verbose_name="Co-traitance", default=False)
_is_cocontracting = models.BooleanField(verbose_name="Fonctionnalité désactivée", default=False)

asp_id = models.IntegerField(verbose_name="ID ASP", blank=True, null=True)
is_active = models.BooleanField(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Generated by Django 4.2.15 on 2025-01-03 10:18

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("tenders", "0094_add_templatetransactional_tender_author_commercial_partners"),
]

operations = [
migrations.RemoveField(
model_name="tender",
name="accept_cocontracting",
),
migrations.RemoveField(
model_name="tender",
name="siae_detail_cocontracting_click_count",
),
migrations.RemoveField(
model_name="tendersiae",
name="detail_cocontracting_click_date",
),
migrations.AddField(
model_name="tender",
name="_accept_cocontracting",
field=models.BooleanField(default=False, verbose_name="Archivé"),
),
migrations.AddField(
model_name="tender",
name="_siae_detail_cocontracting_click_count",
field=models.IntegerField(default=0, verbose_name="Archivé"),
),
migrations.AddField(
model_name="tendersiae",
name="_detail_cocontracting_click_date",
field=models.DateTimeField(blank=True, null=True, verbose_name="Archivé"),
),
]
13 changes: 4 additions & 9 deletions lemarche/tenders/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,9 +414,8 @@ class Tender(models.Model):
)

response_is_anonymous = models.BooleanField(verbose_name="Je souhaite rester anonyme", blank=False, default=False)
accept_cocontracting = models.BooleanField(
verbose_name="Ouvert à la co-traitance",
help_text="Ce besoin peut être répondu par plusieurs prestataires (co-traitance ou sous-traitance)",
_accept_cocontracting = models.BooleanField(
verbose_name="Archivé",
default=False,
)

Expand Down Expand Up @@ -653,9 +652,7 @@ class Tender(models.Model):
siae_detail_contact_click_count = models.IntegerField(
"Nombre de structures intéressées", help_text=RECALCULATED_FIELD_HELP_TEXT, default=0
)
siae_detail_cocontracting_click_count = models.IntegerField(
"Nombre de structures ouvertes à la co-traitance", help_text=RECALCULATED_FIELD_HELP_TEXT, default=0
)
_siae_detail_cocontracting_click_count = models.IntegerField("Archivé", default=0)
siae_detail_not_interested_click_count = models.IntegerField(
"Nombre de structures pas intéressées", help_text=RECALCULATED_FIELD_HELP_TEXT, default=0
)
Expand Down Expand Up @@ -1106,9 +1103,7 @@ class TenderSiae(models.Model):
detail_contact_click_date = models.DateTimeField(
verbose_name="Date de clic sur les coordonnées du besoin", blank=True, null=True
)
detail_cocontracting_click_date = models.DateTimeField(
verbose_name="Date de clic sur Répondre en co-traitance", blank=True, null=True
)
_detail_cocontracting_click_date = models.DateTimeField(verbose_name="Archivé", blank=True, null=True)
detail_not_interested_click_date = models.DateTimeField(
verbose_name="Date de clic sur Pas intéressé", blank=True, null=True
)
Expand Down

0 comments on commit 9c4c1bd

Please sign in to comment.