Skip to content
New issue

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

Fix minor bug introduced in 1426 #1444

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Takahiro-Yoko
Copy link

@Takahiro-Yoko Takahiro-Yoko commented Dec 15, 2024

Description

#1426 added request (type Request) argument to get_current_user function, but not importing fastapi.Request. This causes below error.
superagi_error_20241214_114222
I've added from fastapi import Request in superagi/helper/auth.py (97f108f), and this solves above error, but causes another issue. Seems like relating to fastapi/fastapi#9897
superagi_error_20241215_095538
So, I've simply removed Request type hint from get_current_user. Maybe better solution exists, but for now, this works fine.

Related Issues

#1426
fastapi/fastapi#9897

Solution and Design

Removed Request type hint from get_current_user

Test Plan

Run docker compose -f docker-compose.yaml up backend
Confirm Application startup complete. message showing up.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Docs update

Checklist

  • My pull request is atomic and focuses on a single change.
  • I have read the contributing guide and my code conforms to the guidelines.
  • I have documented my changes clearly and comprehensively.
  • I have added the required tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant