This commit is contained in:
Lucie Galland 2022-03-15 11:28:44 +01:00
parent 764ffea61f
commit 31f6dc0961
2 changed files with 2 additions and 2 deletions

View file

@ -19,7 +19,7 @@ class ParticipantsAdmin(admin.ModelAdmin):
list_display = ["participant", "event", "reponse", "creationDate", "updateDate"]
def has_add_permission(self, req):
return False
def has_change_permission(self, change):
def has_change_permission(self,obj, change=False):
return False

View file

@ -79,4 +79,4 @@ class Participants(models.Model):
auto_now=True, verbose_name=_("Dernière mise à jour")
)
class Meta:
constraints = [ UniqueConstraint(fields=['event', 'participant'], name='reponse unique aux event') ]
constraints = [ models.UniqueConstraint(fields=['event', 'participant'], name='reponse unique aux event') ]