Fetches an app variant by its base ID and config name. Args: base_id (str): The ID of the variant base to fetch Returns: AppVariantDB: The fetched app variant, or None if no app variant was found.
(base_id: str)
| 160 | |
| 161 | |
| 162 | async def fetch_app_variant_by_base_id(base_id: str) -> Optional[AppVariantDB]: |
| 163 | """ |
| 164 | Fetches an app variant by its base ID and config name. |
| 165 | |
| 166 | Args: |
| 167 | base_id (str): The ID of the variant base to fetch |
| 168 | |
| 169 | Returns: |
| 170 | AppVariantDB: The fetched app variant, or None if no app variant was found. |
| 171 | """ |
| 172 | |
| 173 | assert base_id is not None, "base_id cannot be None" |
| 174 | async with engine.core_session() as session: |
| 175 | result = await session.execute( |
| 176 | select(AppVariantDB).filter_by(base_id=uuid.UUID(base_id)) |
| 177 | ) |
| 178 | app_variant = result.scalars().first() |
| 179 | return app_variant |
| 180 | |
| 181 | |
| 182 | async def fetch_app_variant_by_base_id_and_config_name( |
nothing calls this directly
no test coverage detected