We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Repro steps:
Environment: Request Method: GET Request URL: http://localhost:8000/spaces/14/join Django Version: 4.0.4 Python Version: 3.8.10 Installed Applications: ['articles', 'dashboard', 'glossary', 'spaces', 'users', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django_bootstrap5', 'markdownify.apps.MarkdownifyConfig', 'storages'] Installed Middleware: ['django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware'] Traceback (most recent call last): File "/home/mustafacagataytulun/code/bounswe573-2022/colearnapp/venv/lib/python3.8/site-packages/django/core/handlers/exception.py", line 55, in inner response = get_response(request) File "/home/mustafacagataytulun/code/bounswe573-2022/colearnapp/venv/lib/python3.8/site-packages/django/core/handlers/base.py", line 197, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/home/mustafacagataytulun/code/bounswe573-2022/colearnapp/venv/lib/python3.8/site-packages/django/contrib/auth/decorators.py", line 23, in _wrapped_view return view_func(request, *args, **kwargs) File "/home/mustafacagataytulun/code/bounswe573-2022/colearnapp/spaces/views.py", line 75, in join return redirect('spaces:view', id=space.id) Exception Type: UnboundLocalError at /spaces/14/join Exception Value: local variable 'space' referenced before assignment
The text was updated successfully, but these errors were encountered:
Fixed error when already joined user tries to join to colearning spac…
fc0fe62
…e again. #54
This was an interesting behavior of Python (for example, C# throws a compile-time error for this).
Fixed by defining space variable outside of if block.
space
if
Sorry, something went wrong.
mustafacagataytulun
No branches or pull requests
Repro steps:
The text was updated successfully, but these errors were encountered: