MCPcopy Create free account
hub / github.com/hunvreus/devpush / async_validate_name

Method async_validate_name

app/forms/project.py:580–593  ·  view source on GitHub ↗
(self, field)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

_Function · 0.50

Tested by

no test coverage detected