Skip to content

Conversation

@rustybrooks-realitydefender
Copy link
Contributor

@rustybrooks-realitydefender rustybrooks-realitydefender commented Jul 30, 2025

diff is messy because I ran ruff format we should just make sure that our IDEs are set up to run that on save, and I guess at some point set it up in CI/CD

The actual fix is this

        self.base_url = config.get("base_url") or DEFAULT_API_ENDPOINT

The problem is that "base_url" DOES get set, but if no value is passed to RealityDefender() then that value is None, so .get() will return None

I also modified a test to check this

@rustybrooks-realitydefender rustybrooks-realitydefender merged commit f9d7a4e into main Jul 30, 2025
4 checks passed
@rustybrooks-realitydefender rustybrooks-realitydefender deleted the PRODENG-323-fix-python-sdk-error branch July 30, 2025 16:41
@mabeledo
Copy link
Contributor

Good catch! I'm a bit surprised because I usually check the falsyness of a value in a dict using or, and here it seems I explicitly changed the code to use .get(key, [default]).

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.

4 participants