Commit 7a31e4c9 authored by Laury Bueno's avatar Laury Bueno
Browse files

[Certification] Add a compatibility property to CourseCertification

parent c8854013
......@@ -70,6 +70,11 @@ class CourseCertification(models.Model):
def get_absolute_url(self):
return reverse_lazy('courses_legacy:certificate', args=[self.link_hash])
# FIXME: this is a compatibility patch and must be removed in the future
def document_type(self):
return self.type
def save(self, *args, **kwargs):
self.course_workload = self.course_student.course.workload
self.course_total_units = self.course_student.units_done.count()
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