]> git.parisson.com Git - teleforma.git/commitdiff
Undo : Add testimonial type field on seminar : https://trackers.pilotsystems.net...
authorYoan Le Clanche <yoanl@pilotsystems.net>
Mon, 16 Jan 2023 13:05:47 +0000 (14:05 +0100)
committerYoan Le Clanche <yoanl@pilotsystems.net>
Mon, 16 Jan 2023 13:05:47 +0000 (14:05 +0100)
teleforma/migrations/0014_seminar_testimonial_type.py [deleted file]
teleforma/models/pro.py
teleforma/views/pro.py

diff --git a/teleforma/migrations/0014_seminar_testimonial_type.py b/teleforma/migrations/0014_seminar_testimonial_type.py
deleted file mode 100644 (file)
index 22e7937..0000000
+++ /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),
-        ),
-    ]
index 860eff181fe071d1bdae3e7a349419f8452f6249..bc3205556a9068124ad137f642675baabeb0dd13 100644 (file)
@@ -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)
index 2ed864962491f6d51d8481fcfe68f0e53d9e9f2a..1c47a53091201c60ceaef04d9b06891978beac16 100644 (file)
@@ -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