From 0ee9aaea8422fe91cbe8b14c8c976535f24e0620 Mon Sep 17 00:00:00 2001 From: Yogesh Ojha Date: Sun, 8 Sep 2024 03:45:36 +0530 Subject: [PATCH] fix onboarding error when hackerone keys are not set --- web/dashboard/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/dashboard/views.py b/web/dashboard/views.py index 13e685044..9eaaf58a9 100644 --- a/web/dashboard/views.py +++ b/web/dashboard/views.py @@ -417,8 +417,8 @@ def onboarding(request): context['openai_key'] = OpenAiAPIKey.objects.first() context['netlas_key'] = NetlasAPIKey.objects.first() context['chaos_key'] = ChaosAPIKey.objects.first() - context['hackerone_key'] = HackerOneAPIKey.objects.first().key - context['hackerone_username'] = HackerOneAPIKey.objects.first().username + context['hackerone_key'] = HackerOneAPIKey.objects.first().key if HackerOneAPIKey.objects.first() else '' + context['hackerone_username'] = HackerOneAPIKey.objects.first().username if HackerOneAPIKey.objects.first() else '' context['user_preferences'], _ = UserPreferences.objects.get_or_create( user=request.user