style(backend): formatter 收口两处漏网文件(纯格式无行为变化)
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
parent
acf87fdfdc
commit
e95dc4b2de
@ -40,9 +40,7 @@ def list_by_ref(
|
|||||||
return list(session.execute(stmt).all())
|
return list(session.execute(stmt).all())
|
||||||
|
|
||||||
|
|
||||||
def count_by_ref(
|
def count_by_ref(session: Session, *, owner_type: int, ref_column, ref_id: int) -> int:
|
||||||
session: Session, *, owner_type: int, ref_column, ref_id: int
|
|
||||||
) -> int:
|
|
||||||
"""统计某引用对象的归属留痕总数,供分页使用。"""
|
"""统计某引用对象的归属留痕总数,供分页使用。"""
|
||||||
stmt = select(func.count(OwnershipChangeLog.id)).where(
|
stmt = select(func.count(OwnershipChangeLog.id)).where(
|
||||||
OwnershipChangeLog.owner_type == owner_type,
|
OwnershipChangeLog.owner_type == owner_type,
|
||||||
|
|||||||
@ -217,7 +217,10 @@ def update_grade(
|
|||||||
raise NotFoundError("评级等级不存在")
|
raise NotFoundError("评级等级不存在")
|
||||||
|
|
||||||
_ensure_no_overlap(
|
_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)
|
existed = rating_repository.get_by_name(session, payload.grade_name)
|
||||||
if existed is not None and existed.id != grade_id:
|
if existed is not None and existed.id != grade_id:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user