]> git.parisson.com Git - teleforma.git/commitdiff
fix dept name rpc call
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Mon, 29 May 2023 15:21:56 +0000 (17:21 +0200)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Mon, 29 May 2023 15:21:56 +0000 (17:21 +0200)
teleforma/views/core.py

index 812d7f8edd2db0b9296a212408845bce8ac5cdc6..6a03eae40f395821cf3974c14bfe992e93ee1273 100644 (file)
@@ -363,8 +363,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, is_open=True)]