]> git.parisson.com Git - teleforma.git/commitdiff
add Period.department
authorGuillaume Pellerin <guillaume.pellerin@parisson.com>
Fri, 13 Sep 2024 05:54:48 +0000 (07:54 +0200)
committerGuillaume Pellerin <guillaume.pellerin@parisson.com>
Fri, 13 Sep 2024 05:54:48 +0000 (07:54 +0200)
teleforma/models/core.py

index 956e2709fb431959e2fa99bd12d9d2445e3df529..b116609856f07741a9f94ebb7de5b06093ebba46 100755 (executable)
@@ -218,6 +218,9 @@ class Period(Model):
 
     name            = CharField(_('name'), max_length=255)
     description     = CharField(_('description'), max_length=255, blank=True)
+    department = models.ForeignKey('Department', related_name='period',
+                               verbose_name=_('department'),
+                               blank=True, null=True, on_delete=models.SET_NULL)
 
     def __str__(self):
         return self.name