MCPcopy Index your code
hub / github.com/hunvreus/devpush / has_active_environment_with_slug

Method has_active_environment_with_slug

app/models.py:421–430  ·  view source on GitHub ↗

Check if an active environment with given slug exists

(
        self, slug: str, exclude_id: str | None = None
    )

Source from the content-addressed store, hash-verified

419 return env_vars
420
421 def has_active_environment_with_slug(
422 self, slug: str, exclude_id: str | None = None
423 ) -> bool:
424 """Check if an active environment with given slug exists"""
425 return any(
426 environment
427 for environment in self.active_environments
428 if environment.get("slug") == slug
429 and (exclude_id is None or environment.get("id") != exclude_id)
430 )
431
432 def create_environment(self, name: str, slug: str, **kwargs) -> dict:
433 """Create a new environment with a unique ID"""

Callers 3

create_environmentMethod · 0.95
update_environmentMethod · 0.95
validate_slugMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected