From ed2a756fa80caca1feb8c280aa68ce792aff0722 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ses=C3=B3stris=20Vieira?= Date: Thu, 11 May 2023 16:25:27 -0300 Subject: [PATCH] =?UTF-8?q?Remove=20bug=20nas=20permiss=C3=B5es=20de=20eve?= =?UTF-8?q?ntos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sigi/apps/eventos/admin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sigi/apps/eventos/admin.py b/sigi/apps/eventos/admin.py index 8260e82..e32ed36 100644 --- a/sigi/apps/eventos/admin.py +++ b/sigi/apps/eventos/admin.py @@ -218,12 +218,13 @@ class EventoAdmin(CartExportMixin, admin.ModelAdmin): { "can_createcourse": ( perm + and obj and obj.moodle_courseid is None and obj.tipo_evento.moodle_template_courseid is not None and obj.tipo_evento.moodle_categoryid is not None ), "can_updateparticipantes": ( - perm and obj.moodle_courseid is not None + perm and obj and obj.moodle_courseid is not None ), } )