style(backend): formatter 收口两处漏网文件(纯格式无行为变化)

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
liuwenxin 2026-10-15 17:25:24 +08:00
parent acf87fdfdc
commit e95dc4b2de
2 changed files with 5 additions and 4 deletions

View File

@ -40,9 +40,7 @@ def list_by_ref(
return list(session.execute(stmt).all())
def count_by_ref(
session: Session, *, owner_type: int, ref_column, ref_id: int
) -> int:
def count_by_ref(session: Session, *, owner_type: int, ref_column, ref_id: int) -> int:
"""统计某引用对象的归属留痕总数,供分页使用。"""
stmt = select(func.count(OwnershipChangeLog.id)).where(
OwnershipChangeLog.owner_type == owner_type,

View File

@ -217,7 +217,10 @@ def update_grade(
raise NotFoundError("评级等级不存在")
_ensure_no_overlap(
rating_repository.list_all(session, for_update=True), new_min, new_max, exclude_id=grade_id
rating_repository.list_all(session, for_update=True),
new_min,
new_max,
exclude_id=grade_id,
)
existed = rating_repository.get_by_name(session, payload.grade_name)
if existed is not None and existed.id != grade_id: