diff --git a/physionet-django/training/views.py b/physionet-django/training/views.py index b83ca6cb66..1c6a9069d6 100644 --- a/physionet-django/training/views.py +++ b/physionet-django/training/views.py @@ -50,7 +50,8 @@ def courses(request): if not all(map(lambda x: x.isdigit() or x == '.', str(file_data['courses'][0]['version']))): messages.error(request, 'Version number is not valid.') # checking if the version number is greater than the existing version - elif float(file_data['courses'][0]['version']) <= float(existing_course.order_by('-version').first().version): + elif float(file_data['courses'][0]['version'] + ) <= float(existing_course.order_by('-version').first().version): messages.error(request, 'Version number should be greater than the existing version.') else: # Checks passed and moving to saving the course serializer = TrainingTypeSerializer(training_type, data=file_data, partial=True)