From 3411cdfcde1ee5e9da26624636e7d30a9da64d08 Mon Sep 17 00:00:00 2001 From: rutvikrj26 Date: Thu, 6 Jul 2023 17:00:52 -0400 Subject: [PATCH] Fixed Styling Issues --- physionet-django/training/models.py | 1 + physionet-django/training/views.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/physionet-django/training/models.py b/physionet-django/training/models.py index 9825e7a363..0431bfe5bc 100644 --- a/physionet-django/training/models.py +++ b/physionet-django/training/models.py @@ -245,6 +245,7 @@ def update_last_completed_order(self, completed_content_or_quiz): self.last_completed_order = completed_content_or_quiz.order self.save() + class CompletedContent(models.Model): """ Model representing a completed content block. diff --git a/physionet-django/training/views.py b/physionet-django/training/views.py index 9bdfee3505..f8a3c5cbd8 100644 --- a/physionet-django/training/views.py +++ b/physionet-django/training/views.py @@ -279,7 +279,7 @@ def course_details(request, training_slug): except json.decoder.JSONDecodeError: messages.error(request, 'JSON file is not properly formatted.') return redirect("courses") - + # Checking if a course with the same name already exists existing_course = Course.objects.filter(training_type__name=file_data['name']) if existing_course.exists():