(self, activity: dict[str, Any], keyword: str)
| 952 | return filtered_activities |
| 953 | |
| 954 | def _activity_matches_keyword(self, activity: dict[str, Any], keyword: str) -> bool: |
| 955 | searchable_values = [ |
| 956 | activity.get("action"), |
| 957 | activity.get("targetType"), |
| 958 | activity.get("target_type"), |
| 959 | activity.get("targetId"), |
| 960 | activity.get("target_id"), |
| 961 | activity.get("targetName"), |
| 962 | activity.get("target_name"), |
| 963 | ] |
| 964 | meta = activity.get("meta") |
| 965 | if isinstance(meta, dict): |
| 966 | searchable_values.extend(meta.values()) |
| 967 | |
| 968 | return any(keyword in str(value or "").lower() for value in searchable_values) |
| 969 | |
| 970 | def _build_admin_activity_options( |
| 971 | self, |
no outgoing calls
no test coverage detected