@@ -58,6 +58,17 @@ class Profile(models.Model):
5858 # Departement should be a foreign key pointing to the departement table
5959 # but it's not the case today on Nuxt's side.
6060 departement = models .CharField (verbose_name = "Département" , blank = True )
61+ # PPA sides have rights depending on their departments. This is an ugly and quick fix
62+ # to link users to several departments (and not only one).
63+ # It should be refactored!
64+ departements = ArrayField (
65+ verbose_name = "Départements" ,
66+ # CharField to allow departments starting with a zero. Otherwise, zero is erased.
67+ base_field = models .CharField (max_length = 3 , blank = True ),
68+ size = 50 ,
69+ blank = True ,
70+ null = True ,
71+ )
6172 collectivite = models .ForeignKey (
6273 Collectivite ,
6374 on_delete = models .SET_NULL ,
@@ -89,7 +100,7 @@ class Profile(models.Model):
89100 optin = models .BooleanField (verbose_name = "Inscrit à l'infolettre" , default = False )
90101 # No mention of this column on Nuxt's code. Dead code?
91102 updated_pipedrive = models .BooleanField (
92- verbose_name = "Mis à jour Pipedrive" , blank = True
103+ verbose_name = "Mis à jour Pipedrive" , blank = True , null = True
93104 )
94105 is_admin = models .BooleanField (
95106 verbose_name = "Est admin" , default = False , db_comment = "super admin bypass"
0 commit comments