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

index 4bc1ba9b29669b1d59545a8e0f1624a4b98ac54c..0018e9e335692ff0687196a31c9415feaad71ea2 100644 (file)
@@ -203,8 +203,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)]
 
     def pull(request, organization_name):