From d6359528ccb469b7f7e9cca51f69684dd20e3f5b Mon Sep 17 00:00:00 2001 From: yomguy Date: Thu, 21 Feb 2013 16:07:02 +0100 Subject: [PATCH] bugfix regresion --- teleforma/context_processors.py | 6 ++++-- teleforma/models/pro.py | 10 ---------- teleforma/templates/teleforma/seminar_detail.html | 3 +-- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/teleforma/context_processors.py b/teleforma/context_processors.py index b0c91fcc..f769d26f 100644 --- a/teleforma/context_processors.py +++ b/teleforma/context_processors.py @@ -126,8 +126,10 @@ def all_seminars(request, progress_order=False, date_order=False): # get the demo if no seminars if not seminars: - course = Course.objects.get(code='demo') - seminars = Seminar.objects.filter(course=course) + course = Course.objects.filter(code='demo') + if course: + course = course[0] + seminars = Seminar.objects.filter(course=course) return {'all_seminars': seminars} diff --git a/teleforma/models/pro.py b/teleforma/models/pro.py index 3f633db7..908bc312 100755 --- a/teleforma/models/pro.py +++ b/teleforma/models/pro.py @@ -264,16 +264,6 @@ class Auditor(models.Model): except: return '' - def save(self, **kwargs): - super(Auditor, self).save(**kwargs) - for conference in self.conferences: - try: - seminar = conference.seminar.get() - if not seminar in self.seminars: - self.seminars.add(seminar) - except: - continue - class Meta(MetaCore): db_table = app_label + '_' + 'auditor' verbose_name = _('Auditor') diff --git a/teleforma/templates/teleforma/seminar_detail.html b/teleforma/templates/teleforma/seminar_detail.html index 3a882e65..d476062d 100644 --- a/teleforma/templates/teleforma/seminar_detail.html +++ b/teleforma/templates/teleforma/seminar_detail.html @@ -99,7 +99,6 @@ $(function () { {% endwith %} - {% with seminar.question as questions %}
@@ -139,7 +138,7 @@ $(function () {
{% endif %} - {% endblock course_content %} + {% endblock course_content %}
-- 2.39.5