Making scope filter by product id
This commit is contained in:
1 parent
6d7c5c5604
commit
2318a6daeb
4 files changed
+36
-5
No files matched your search
@@ -33,8 +33,9 @@ async def build(
|
||||
"""Return the context for ``scopes.html``.
|
||||
|
||||
The scope rows are narrowed by the scope-attribute filters (``description``
|
||||
matches the scope's description; the ``*_id`` filters match exactly).
|
||||
``fits_part_type_id`` keeps only scopes that have at least one (non-``none``)
|
||||
matches either the scope's description or its SKU/product ID; the ``*_id``
|
||||
filters match exactly). ``fits_part_type_id`` keeps only scopes that have
|
||||
at least one (non-``none``)
|
||||
fit for that part type. Callers that paginate should slice ``rows``
|
||||
themselves — this always returns the full filtered set, since
|
||||
``fits_part_type_id`` is a post-filter that can't be pushed into the DB query.
|
||||
@@ -71,6 +72,7 @@ async def build(
|
||||
sub_part_type_id=sub_part_type_id,
|
||||
part_type_id=scope_type.id,
|
||||
limit=1000,
|
||||
match_sku=True,
|
||||
)
|
||||
scope_ids = {s.id for s in scopes}
|
||||
if not scope_ids:
|
||||
|
||||
Reference in new issue
Block a user