(self, field)
| 578 | # process_commands_and_root_directory(self, formdata) |
| 579 | |
| 580 | async def async_validate_name(self, field): |
| 581 | if self.db and self.team: |
| 582 | result = await self.db.execute( |
| 583 | select(Project).where( |
| 584 | func.lower(Project.name) == field.data.lower(), |
| 585 | Project.team_id == self.team.id, |
| 586 | ) |
| 587 | ) |
| 588 | if result.scalar_one_or_none(): |
| 589 | raise ValidationError( |
| 590 | _( |
| 591 | "A project with this name already exists in this team or is reserved." |
| 592 | ) |
| 593 | ) |
| 594 | |
| 595 | validate_runner = validate_runner |
| 596 |