feat: complete chat sessions and production startup
This commit is contained in:
@@ -21,6 +21,8 @@ def digest(value):
|
||||
|
||||
|
||||
def require_scope(db, conversation: Conversation, *, version_id=None, batch_id=None, project_id=None):
|
||||
if version_id and not db.get(CourseVersion, version_id):
|
||||
raise HTTPException(404, "课程版本不存在")
|
||||
batch = db.get(ScoringBatch, batch_id) if batch_id else None
|
||||
project = db.get(Project, project_id) if project_id else None
|
||||
if batch_id and not batch or project_id and not project:
|
||||
|
||||
Reference in New Issue
Block a user