-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
When running reNgine v2.2.0 (Docker setup), the dashboard throws a 500 error after login if no HackerOneAPIKey object exists in the database.
The error occurs in dashboard/views.py at line 420:
context['hackerone_key'] = HackerOneAPIKey.objects.first().key
If no record exists, .first() returns None, leading to:
AttributeError: 'NoneType' object has no attribute 'key'
Expected Behavior
Application should be properly redirected to dashboard after Login to the web UI.
Steps To Reproduce
- Set up reNgine using Docker (v2.2.0) and complete installation.
- Login to the web UI.
- Observe the 500 error after login.
Environment
- reNgine: 2.2.0
- OS: Docker container -MSYS_NT-10.0-22631 3.5.7-463ebcdc.x86_64
- Python: Python 3.10.12
- Docker Engine: 4.41.1 (191279)
- Docker Compose: v2.35.1-desktop.1
- Browser: Version 136.0.3240.50 (Official build) (64-bit)
Anything else?
Logs & Traceback:
Internal Server Error: /
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/usr/local/lib/python3.10/dist-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/src/app/dashboard/views.py", line 420, in onboarding
context['hackerone_key'] = HackerOneAPIKey.objects.first().key
AttributeError: 'NoneType' object has no attribute 'key'
Workaround:
I manually created a dummy key via Django shell:
docker compose exec web python3 manage.py shell
Then ran:
>>>from dashboard.models import HackerOneAPIKey
>>>HackerOneAPIKey.objects.create(key='dummy_key')
>>>exit()
After that, the error was resolved.
dmchaledev
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working