mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-15 01:21:48 +03:00
fix(user identity): User identity dict has no attribute user_id and open_api_key (#1351)
# Description Trying to access access 'user identity' attributes as attribute of dictionary which throws an error since the attributes are actually the key in the dictionary not an attribute of the dictionary object. ## Checklist before requesting a review Please delete options that are not relevant. - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my code ## Screenshots (if appropriate): <img width="795" alt="image" src="https://github.com/StanGirard/quivr/assets/88370405/7db55e74-159c-43e1-b9f7-8384dad9be30"> Co-authored-by: HamzaKhalid-bboxx <127825841+HamzaKhalid-bboxx@users.noreply.github.com> Co-authored-by: Zineb El Bachiri <100568984+gozineb@users.noreply.github.com>
This commit is contained in:
parent
b9172b7442
commit
024dd5a264
@ -19,5 +19,5 @@ def create_user_identity(id: UUID, openai_api_key: Optional[str]) -> UserIdentit
|
||||
)
|
||||
user_identity = response.data[0]
|
||||
return UserIdentity(
|
||||
id=user_identity.user_id, openai_api_key=user_identity.openai_api_key # type: ignore
|
||||
id=user_identity.get('user_id'), openai_api_key=user_identity.get('openai_api_key') # type: ignore
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user