mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-24 04:51:51 +00:00
fix(github): use raw_data fallback for org attributes not exposed by PyGithub
This commit is contained in:
@@ -162,6 +162,9 @@ class Organization(GithubService):
|
||||
"""Return attribute value if it matches expected type and is not a mock placeholder."""
|
||||
try:
|
||||
value = getattr(org, attribute, None)
|
||||
# Fallback to raw_data for fields not exposed as PyGithub properties
|
||||
if value is None and hasattr(org, "raw_data"):
|
||||
value = org.raw_data.get(attribute)
|
||||
if hasattr(value, "_mock_parent"):
|
||||
return None
|
||||
if expected_type is bool and isinstance(value, bool):
|
||||
|
||||
Reference in New Issue
Block a user