]> git.parisson.com Git - teleforma.git/commitdiff
use dept name ae
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Mon, 29 May 2023 22:49:11 +0000 (00:49 +0200)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Mon, 29 May 2023 22:49:11 +0000 (00:49 +0200)
teleforma/views/core.py

index 12bc0070958036cf9f5974ac0a55914b5522292f..539267d8e4c854ed90b72eaf0bd27ee7a25b41ce 100644 (file)
@@ -338,8 +338,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)]