]> git.parisson.com Git - teleforma.git/commitdiff
fix periode rpc
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Mon, 20 Nov 2023 15:19:15 +0000 (16:19 +0100)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Wed, 22 Nov 2023 17:03:28 +0000 (18:03 +0100)
teleforma/views/core.py

index ee7a5046214690d4296077903a046903865a393e..ccb699374aa5963a1b175cd7cf1304677a319c6a 100644 (file)
@@ -322,8 +322,8 @@ class PeriodAccessMixin(View):
         return super(PeriodAccessMixin, self).render_to_response(context)
 
     @jsonrpc_method('teleforma.get_period_list')
-    def get_period_list(request, department_id):
-        department = Department.objects.get(id=department_id)
+    def get_period_list(request, department_name):
+        department = Department.objects.get(name=department_name)
         return [period.name for period in Period.objects.filter(department=department)]