Running black on all files
This commit is contained in:
1 parent
3237824e83
commit
740dfc97c7
5 files changed
+63
-20
No files matched your search
@@ -63,7 +63,10 @@ async def list_filtered(
|
||||
if description.strip():
|
||||
term = f"%{description.strip()}%"
|
||||
q = q.where(
|
||||
or_(ImportedPart.Description.ilike(term), ImportedPart.InventoryID.ilike(term))
|
||||
or_(
|
||||
ImportedPart.Description.ilike(term),
|
||||
ImportedPart.InventoryID.ilike(term),
|
||||
)
|
||||
)
|
||||
q = _apply_sort(q, sort, direction)
|
||||
result = await db.execute(q.offset(skip).limit(limit))
|
||||
@@ -93,7 +96,10 @@ async def count_filtered(db: AsyncSession, description: str = "") -> int:
|
||||
if description.strip():
|
||||
term = f"%{description.strip()}%"
|
||||
q = q.where(
|
||||
or_(ImportedPart.Description.ilike(term), ImportedPart.InventoryID.ilike(term))
|
||||
or_(
|
||||
ImportedPart.Description.ilike(term),
|
||||
ImportedPart.InventoryID.ilike(term),
|
||||
)
|
||||
)
|
||||
result = await db.execute(q)
|
||||
return result.scalar_one()
|
||||
|
||||
Reference in new issue
Block a user