Commit 299aa66a authored by Matheus Miranda's avatar Matheus Miranda
Browse files

Merge branch 'develop' into 'master'

Update is_public attribute

See merge request !70
parents 0637bac4 f5ec1b2e
......@@ -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()
# Generated by Django 2.2.24 on 2021-07-20 00:07
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('courses', '0028_auto_20210629_1048'),
]
operations = [
migrations.AlterField(
model_name='course',
name='is_public',
field=models.BooleanField(default=True, verbose_name='Public'),
),
]
......@@ -182,7 +182,7 @@ class Course(models.Model):
is_public = models.BooleanField(
_('Public'),
default=False,
default=True,
)
forum = models.OneToOneField(
......
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