MultipleObjectsReturned at /app/alsijil/me/ - get() returned more than one Group -- it returned 18!
Internal Server Error: /app/alsijil/me/
MultipleObjectsReturned at /app/alsijil/me/
get() returned more than one Group -- it returned 18!
Request Method: GET
Request URL: [1] https://info.katharineum.de/app/alsijil/me/?school_term=2&date_start=01.02.2021&date_end=30.06.2021&has_documentation=false&group=...&subject=
Django Version: 3.2.4
Python Executable: /usr/bin/uwsgi-core
Python Version: 3.9.2
Python Path: ['/srv/aleksis', '.', '', '/usr/lib/python39.zip', '/usr/lib/python3.9', '/usr/lib/python3.9/lib-dynload', '/srv/aleksis/envs/production/lib/python3.9/site-packages']
Server time: Mon, 09 Aug 2021 22:36:35 +0200
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.sites',
'django.contrib.staticfiles',
'django.contrib.humanize',
'django_uwsgi',
'django_extensions',
'guardian',
'rules.apps.AutodiscoverRulesConfig',
'haystack',
'polymorphic',
'dbbackup',
'django_celery_beat',
'django_celery_results',
'celery_progress',
'health_check.contrib.celery',
'djcelery_email',
'celery_haystack',
'sass_processor',
'django_any_js',
'django_yarnpkg',
'django_tables2',
'maintenance_mode',
'menu_generator',
'reversion',
'phonenumber_field',
'debug_toolbar',
'django_prometheus',
'django_select2',
'hattori',
'templated_email',
'html2text',
'django_otp.plugins.otp_totp',
'django_otp.plugins.otp_static',
'django_otp',
'otp_yubikey',
'aleksis.core',
'allauth',
'allauth.account',
'allauth.socialaccount',
'health_check',
'health_check.db',
'health_check.cache',
'health_check.storage',
'health_check.contrib.psutil',
'health_check.contrib.migrations',
'dynamic_preferences',
'dynamic_preferences.users.apps.UserPreferencesConfig',
'impersonate',
'two_factor',
'material',
'ckeditor',
'ckeditor_uploader',
'django_js_reverse',
'colorfield',
'django_bleach',
'favicon',
'django_filters',
'oauth2_provider',
'rest_framework',
'feeds',
'aleksis.apps.csv_import.apps.CSVImportConfig',
'aleksis.apps.chronos.apps.ChronosConfig',
'aleksis.apps.untis.apps.UntisConfig',
'aleksis.apps.resint.apps.ResintConfig',
'aleksis.apps.dashboardfeeds.apps.DefaultConfig',
'aleksis.apps.fritak.apps.FritakConfig',
'aleksis.apps.ldap.apps.LDAPConfig',
'aleksis.apps.alsijil.apps.AlsijilConfig',
'aleksis.apps.hjelp.apps.HjelpConfig',
'cachalot',
'django_cleanup.apps.CleanupConfig']
Installed Middleware:
['django_prometheus.middleware.PrometheusBeforeMiddleware',
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'debug_toolbar.middleware.DebugToolbarMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.http.ConditionalGetMiddleware',
'django.contrib.sites.middleware.CurrentSiteMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django_otp.middleware.OTPMiddleware',
'impersonate.middleware.ImpersonateMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'maintenance_mode.middleware.MaintenanceModeMiddleware',
'aleksis.core.util.middlewares.EnsurePersonMiddleware',
'django_prometheus.middleware.PrometheusAfterMiddleware']
Traceback (most recent call last):
File "/srv/aleksis/envs/production/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/srv/aleksis/envs/production/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/srv/aleksis/envs/production/lib/python3.9/site-packages/rules/contrib/views.py", line 221, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/srv/aleksis/envs/production/lib/python3.9/site-packages/aleksis/apps/alsijil/views.py", line 957, in overview_person
if filter_form.is_valid()
File "/srv/aleksis/envs/production/lib/python3.9/site-packages/django/forms/forms.py", line 175, in is_valid
return self.is_bound and not self.errors
File "/srv/aleksis/envs/production/lib/python3.9/site-packages/django/forms/forms.py", line 170, in errors
self.full_clean()
File "/srv/aleksis/envs/production/lib/python3.9/site-packages/django/forms/forms.py", line 372, in full_clean
self._clean_fields()
File "/srv/aleksis/envs/production/lib/python3.9/site-packages/django/forms/forms.py", line 390, in _clean_fields
value = field.clean(value)
File "/srv/aleksis/envs/production/lib/python3.9/site-packages/django/forms/fields.py", line 149, in clean
value = self.to_python(value)
File "/srv/aleksis/envs/production/lib/python3.9/site-packages/django/forms/models.py", line 1287, in to_python
value = self.queryset.get(**{key: value})
File "/srv/aleksis/envs/production/lib/python3.9/site-packages/django/db/models/query.py", line 439, in get
raise self.model.MultipleObjectsReturned(
Exception Type: MultipleObjectsReturned at /app/alsijil/me/
Exception Value: get() returned more than one Group -- it returned 18!
Request information:
GET:
school_term = '2'
date_start = '01.02.2021'
date_end = '30.06.2021'
has_documentation = 'false'
group = '...'
subject = ''
POST: No POST data
FILES: No FILES data
Edited by Jonathan Weth