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: Setting API_HOST did not respect SDK settings #31

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hoh
Copy link
Member

@hoh hoh commented Feb 28, 2024

Users had to create a distinct ALEPH_VRF_API_HOST environment variable to configure it and could not use the SDK's ALEPH_API_HOST.

Users had to create a distinct `ALEPH_VRF_API_HOST` environment variable to configure it and could not use the SDK's `ALEPH_API_HOST`.
@@ -30,6 +32,10 @@ class Settings(BaseSettings):
default=None, description="Application private key to post to aleph.im."
)

@property
def api_host(self) -> HttpUrl:
return self.API_HOST or sdk_settings.api_host
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return self.API_HOST or sdk_settings.api_host
return self.API_HOST or sdk_settings.API_HOST

I think the SDK don't have the api_host property, like I just checked here: https://github.com/aleph-im/aleph-sdk-python/blob/main/src/aleph/sdk/conf.py#L25

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.

2 participants