Skip to content
Snippets Groups Projects
Commit 2c2179b5 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

redundant logging removed

parent 8d229eaa
No related branches found
No related tags found
1 merge request!100Test coverage unit tests
......@@ -5,7 +5,7 @@ from django.db.models import Count, Case, When, Min
from django.db.models import Q
from django.http import JsonResponse
from web.models import Subject, StudySubject, Visit, Appointment
from web.models import StudySubject, Visit, Appointment, Subject
from web.models.constants import SUBJECT_TYPE_CHOICES
from web.views import e500_error
from web.views.notifications import get_subjects_with_no_visit, get_subjects_with_reminder, get_today_midnight_date
......@@ -16,14 +16,10 @@ logger = logging.getLogger(__name__)
@login_required
def cities(request):
try:
result_subjects = Subject.objects.filter(city__isnull=False).values_list('city').distinct()
return JsonResponse({
"cities": [x[0] for x in result_subjects]
})
except Exception as e:
logger.error(e, exc_info=True)
return e500_error(request)
result_subjects = Subject.objects.filter(city__isnull=False).values_list('city').distinct()
return JsonResponse({
"cities": [x[0] for x in result_subjects]
})
@login_required
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment