Refactor USTariffFractionService to use async in get_all method and clean up redundant return statement
This commit is contained in:
@@ -137,7 +137,7 @@ class TariffFractionService:
|
||||
from api.v1.modules.a76.general_catalogs.fractions.us_tariff_fractions.service import USTariffFractionService
|
||||
|
||||
# Use local service directly
|
||||
usa_items, total = USTariffFractionService.get_all(
|
||||
usa_items, total = await USTariffFractionService.get_all(
|
||||
db, tenant_id, company_id, skip, limit, filters
|
||||
)
|
||||
|
||||
|
||||
@@ -131,9 +131,7 @@ class USTariffFractionService:
|
||||
total = query.count()
|
||||
items = query.order_by(USTariffFraction.code).offset(skip).limit(limit).all()
|
||||
|
||||
return items, total
|
||||
|
||||
return items, total
|
||||
return items, total
|
||||
|
||||
@staticmethod
|
||||
def get_by_id(
|
||||
|
||||
Reference in New Issue
Block a user