| 385 | |
| 386 | |
| 387 | class ProjectDomainVerifyForm(StarletteForm): |
| 388 | domain_id = HiddenField(validators=[DataRequired()]) |
| 389 | |
| 390 | def __init__(self, *args, domains: list[Domain], **kwargs): |
| 391 | super().__init__(*args, **kwargs) |
| 392 | self.domains = domains |
| 393 | |
| 394 | def validate_domain_id(self, field): |
| 395 | domain = next( |
| 396 | (domain for domain in self.domains if domain.id == int(field.data)), None |
| 397 | ) |
| 398 | if not domain: |
| 399 | raise ValidationError(_("Domain not found.")) |
| 400 | if domain.status == "active": |
| 401 | raise ValidationError(_("Domain is already verified.")) |
| 402 | |
| 403 | |
| 404 | class ProjectBuildAndDeployForm(StarletteForm): |
nothing calls this directly
no outgoing calls
no test coverage detected