(self, actions: Any)
| 661 | return normalized |
| 662 | |
| 663 | def _normalize_actions(self, actions: Any) -> List[Dict[str, Any]]: |
| 664 | try: |
| 665 | from .serializers import PluginActionSerializer |
| 666 | except Exception: |
| 667 | return actions if isinstance(actions, list) else [] |
| 668 | if not isinstance(actions, list): |
| 669 | return [] |
| 670 | serializer = PluginActionSerializer(data=actions, many=True) |
| 671 | if serializer.is_valid(): |
| 672 | return serializer.validated_data |
| 673 | normalized: List[Dict[str, Any]] = [] |
| 674 | for item in actions: |
| 675 | item_ser = PluginActionSerializer(data=item) |
| 676 | if item_ser.is_valid(): |
| 677 | normalized.append(item_ser.validated_data) |
| 678 | else: |
| 679 | logger.warning("Invalid plugin action entry ignored: %s", item_ser.errors) |
| 680 | return normalized |
| 681 | |
| 682 | def _merge_settings_with_defaults(self, settings: Dict[str, Any], fields: List[Dict[str, Any]]) -> Dict[str, Any]: |
| 683 | merged = dict(settings or {}) |
no test coverage detected