]> git.parisson.com Git - teleforma.git/commitdiff
fix student object
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Wed, 3 Feb 2016 23:17:08 +0000 (00:17 +0100)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Wed, 3 Feb 2016 23:17:08 +0000 (00:17 +0100)
teleforma/views/crfpa.py

index 4015178875208f3567069419c32293ec5867b18a..0599ab9551b73efe425f6e2fb61dd0ef6327b4ce 100644 (file)
@@ -447,7 +447,8 @@ class RegistrationPDFViewDownload(RegistrationPDFView):
 
     def get_pdf_filename(self):
         super(RegistrationPDFViewDownload, self).get_pdf_filename()
-        student = self.context['student']
+        user = self.get_object()
+        student = user.student.all()[0]
         prefix = unicode(_('Registration'))
         filename = '_'.join([prefix, student.user.first_name, student.user.last_name])
         filename += '.pdf'