| 61 | |
| 62 | |
| 63 | class Action(BaseModel): |
| 64 | icon: str |
| 65 | label: str |
| 66 | name: str |
| 67 | method: Method = Method.POST |
| 68 | ajax: bool = True |
| 69 | |
| 70 | @validator("ajax") |
| 71 | def ajax_validate(cls, v: bool, values: dict, **kwargs): |
| 72 | if not v and values["method"] != Method.GET: |
| 73 | raise ValueError("ajax is False only available when method is Method.GET") |
| 74 | |
| 75 | |
| 76 | class ToolbarAction(Action): |
no outgoing calls
no test coverage detected