From: Yoan Le Clanche Date: Mon, 16 Jan 2023 13:05:47 +0000 (+0100) Subject: Undo : Add testimonial type field on seminar : https://trackers.pilotsystems.net... X-Git-Tag: 2.8.1-pro~50 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=ff81a63b47147b4d153d918aa4bc1b43ef810d0b;p=teleforma.git Undo : Add testimonial type field on seminar : https://trackers.pilotsystems.net/prebarreau/0606 --- diff --git a/teleforma/migrations/0014_seminar_testimonial_type.py b/teleforma/migrations/0014_seminar_testimonial_type.py deleted file mode 100644 index 22e79377..00000000 --- a/teleforma/migrations/0014_seminar_testimonial_type.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 3.2.3 on 2023-01-16 10:33 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('teleforma', '0013_seminarpart_index'), - ] - - operations = [ - migrations.AddField( - model_name='seminar', - name='testimonial_type', - field=models.CharField(blank=True, choices=[('elearning', 'E-learning'), ('blended', 'Blended')], max_length=10, null=True), - ), - ] diff --git a/teleforma/models/pro.py b/teleforma/models/pro.py index 860eff18..bc320555 100644 --- a/teleforma/models/pro.py +++ b/teleforma/models/pro.py @@ -91,13 +91,6 @@ class Seminar(ClonableMixin, Displayable, ProductCodeMixin, SuggestionsMixin): duration = DurationField(_('approximative duration')) professor = models.ManyToManyField('Professor', related_name='seminar', verbose_name=_('professor'), blank=True) - class TestimonialType(models.TextChoices): - ELEARNING = 'elearning', "E-learning" - BLENDED = "blended", "Blended" - testimonial_type = models.CharField("Type d'attestation", - choices=TestimonialType.choices, - max_length=10, - null=True, blank=True) docs_description = models.ManyToManyField(Document, related_name="seminar_docs_description", verbose_name=_('description documents'), blank=True) diff --git a/teleforma/views/pro.py b/teleforma/views/pro.py index 2ed86496..1c47a530 100644 --- a/teleforma/views/pro.py +++ b/teleforma/views/pro.py @@ -832,7 +832,7 @@ class TestimonialView(PDFTemplateResponseMixin, SeminarView): context['testimonial'] = testimonials[0] context['blended'] = False - if seminar.conference and seminar.testimonial_type != seminar.TESTIMONIAL_TYPE.ELEARNING.value: + if seminar.conference: if seminar.conference.webclass and seminar.conference in self.request.user.auditor.get().conferences.all(): context['blended'] = True context['conference'] = seminar.conference