Method
__init__
(
self,
*args,
project: Project,
domains: list[Domain] | None = None,
db: AsyncSession,
**kwargs,
)
Source from the content-addressed store, hash-verified
| 315 | environment_id = SelectField(_l("Environment"), choices=[]) |
| 316 | |
| 317 | def __init__( |
| 318 | self, |
| 319 | *args, |
| 320 | project: Project, |
| 321 | domains: list[Domain] | None = None, |
| 322 | db: AsyncSession, |
| 323 | **kwargs, |
| 324 | ): |
| 325 | super().__init__(*args, **kwargs) |
| 326 | self.project = project |
| 327 | self.domains = domains or [] |
| 328 | self.db = db |
| 329 | |
| 330 | self.environment_id.choices = [ |
| 331 | (env["id"], env["name"]) for env in project.active_environments |
| 332 | ] |
| 333 | |
| 334 | async def async_validate_hostname(self, field): |
| 335 | if field.data: |
Tested by
no test coverage detected