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

Method async_validate_name

app/forms/storage.py:82–95  ·  view source on GitHub ↗
(self, field)

Source from the content-addressed store, hash-verified

80 self.project = project
81
82 async def async_validate_name(self, field):
83 if self.db and self.team:
84 result = await self.db.execute(
85 select(Storage).where(
86 func.lower(Storage.name) == field.data.lower(),
87 Storage.team_id == self.team.id,
88 )
89 )
90 if result.scalar_one_or_none():
91 raise ValidationError(
92 _(
93 "A storage with this name already exists in this team or is reserved."
94 )
95 )
96
97 def validate_environment_ids(self, field):
98 if not self.project:

Callers

nothing calls this directly

Calls 1

_Function · 0.50

Tested by

no test coverage detected