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

**suggestion:** Consider adding a guard clause to handle cases where actor['type'] might not exist #90

Open
gitworkflows opened this issue Dec 11, 2024 · 0 comments

Comments

@gitworkflows
Copy link
Contributor

          **suggestion:** Consider adding a guard clause to handle cases where actor['type'] might not exist

The current code might raise a KeyError if actor exists but doesn't have a 'type' key. Consider using: if actor and actor.get('type', '').lower() not in allowed_actor_types:

        if actor and actor.get("type", "").lower() not in allowed_actor_types:

Originally posted by @sourcery-ai[bot] in #89 (comment)

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

No branches or pull requests

1 participant