Commit 6116c5b3 authored by Matheus Miranda's avatar Matheus Miranda
Browse files

Update forum on course update

parent ccc177c9
......@@ -25,7 +25,16 @@ def course_created(sender, created, instance, **kwargs):
forum = Forum.objects.create(title=instance.name, is_public=True, forum_type="course")
instance.forum = forum
instance.save()
for type_ in CertificateTemplate.TYPES:
ct = CertificateTemplate(course=instance, document_type=type_[0])
ct.save()
else:
foruns = Forum.objects.filter(id=instance.forum.id)
if foruns:
forum = foruns.first()
forum.title_en = instance.name_en
forum.title_es = instance.name_es
forum.title_pt_br = instance.name_pt_br
forum.save()
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