Skip to content

Commit

Permalink
Merge pull request #1018 from betagouv/fix/userprojectstatus-managers
Browse files Browse the repository at this point in the history
[fix] Migration manquante sur le model UserProjectStatus
  • Loading branch information
glibersat authored Feb 10, 2025
2 parents 7e59cf2 + 410b4fc commit fc87756
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 4.2.17 on 2025-02-10 09:20

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
("projects", "0105_project_is_diagnostic_done"),
]

operations = [
migrations.AlterModelManagers(
name="userprojectstatus",
managers=[],
),
]
9 changes: 3 additions & 6 deletions recoco/apps/projects/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,18 +586,15 @@ class Meta:
is_owner = models.BooleanField(default=False)


class UserProjectStatusManager(models.Manager):
pass


class UserProjectStatusOnSiteManager(UserProjectStatusManager, CurrentSiteManager):
class UserProjectStatusOnSiteManager(CurrentSiteManager):
use_for_related_fields = True
use_in_migrations = False


class UserProjectStatus(models.Model):
"""Project status for a given user"""

objects = UserProjectStatusManager()
objects = models.Manager()
on_site = UserProjectStatusOnSiteManager()

USERPROJECT_STATES = (
Expand Down

0 comments on commit fc87756

Please sign in to comment.