Commit 08bbdcf7 authored by Matheus Miranda's avatar Matheus Miranda
Browse files

Fix template rendering order

parent 8f63d8a0
......@@ -68,9 +68,9 @@ class CourseCertification(models.Model):
@property
def template(self):
if self.type == self.TYPES[0][1]:
return self.course_student.get_current_class().certificate_template
else:
return self.course_student.get_current_class().receipt_template
else:
return self.course_student.get_current_class().certificate_template
@property
def get_approved_process(self):
......@@ -208,12 +208,6 @@ class CertificateTemplate(models.Model):
('certificate', _('Certificate')),
)
name = models.CharField(
_('Name'),
blank=True,
max_length=255,
null=True,
)
course = models.ForeignKey(
Course,
models.CASCADE,
......@@ -225,6 +219,12 @@ class CertificateTemplate(models.Model):
blank=True,
null=True,
)
name = models.CharField(
_('Name'),
blank=True,
max_length=255,
null=True,
)
signature_name = models.CharField(
_('Signature Name'),
blank=True,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment