feat: add versioned app chat API and fix release isolation bug
This commit is contained in:
@@ -63,13 +63,13 @@ def get_apps_by_id(db: Session, app_id: uuid.UUID) -> App:
|
||||
return repo.get_apps_by_id(app_id)
|
||||
|
||||
|
||||
def get_release_by_version(db: Session, app_id: uuid.UUID, version: int):
|
||||
"""根据版本号查询发布快照(仅返回激活状态)"""
|
||||
def get_release_by_version(db: Session, app_id: uuid.UUID, release_id: uuid.UUID):
|
||||
"""根据发布版本ID查询发布快照(仅返回激活状态)"""
|
||||
from app.models.app_release_model import AppRelease
|
||||
return db.scalars(
|
||||
select(AppRelease).where(
|
||||
AppRelease.app_id == app_id,
|
||||
AppRelease.version == version,
|
||||
AppRelease.id == release_id,
|
||||
AppRelease.is_active.is_(True),
|
||||
)
|
||||
).first()
|
||||
|
||||
Reference in New Issue
Block a user