Skip to content

Commit

Permalink
Make github repository optional for guru creation forms
Browse files Browse the repository at this point in the history
  • Loading branch information
aralyekta committed Mar 5, 2025
1 parent 482ca46 commit 52a3a5c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/gurubase-backend/backend/core/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -939,9 +939,10 @@ def notify_admin_on_guru_creation_form_submission(sender, instance, **kwargs):
A new guru creation request has been submitted:
Email: {instance.email}
GitHub Repository: {instance.github_repo}
Documentation URL: {instance.docs_url}
GitHub Repository: {instance.github_repo}
Use Case: {instance.use_case}
Source: {instance.source}
View this request in the admin panel.
"""
Expand Down
4 changes: 2 additions & 2 deletions src/gurubase-backend/backend/core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2865,9 +2865,9 @@ def submit_guru_creation_form(request):
use_case = request.data.get('use_case')
source = request.data.get('source', 'unknown')

if not all([email, github_repo, docs_url]):
if not all([email, docs_url]):
return Response({
'error': 'Missing required fields. Please provide email, Github repository, and documentation root url.'
'error': 'Missing required fields. Please provide email, and documentation root url.'
}, status=status.HTTP_400_BAD_REQUEST)

# Create form submission
Expand Down

0 comments on commit 52a3a5c

Please sign in to comment.