diff --git a/arkindex/budget/models.py b/arkindex/budget/models.py index c9567cb6ada63fe2881287abb46576215abc2d49..8d1bd9757e3062ea63655f6a4d82bb7f5b694e05 100644 --- a/arkindex/budget/models.py +++ b/arkindex/budget/models.py @@ -1,6 +1,7 @@ import uuid from django.conf import settings +from django.contrib.contenttypes.fields import GenericRelation from django.core.validators import MinLengthValidator from django.db import models @@ -9,6 +10,7 @@ class Budget(models.Model): id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False) name = models.CharField(max_length=100, validators=[MinLengthValidator(1)]) total = models.DecimalField(max_digits=12, decimal_places=3, default=0) + memberships = GenericRelation("users.Right", "content_id") def __str__(self) -> str: return self.name