From d4eb127f32865f40fb845c63d8fe0f75a1d6a4e2 Mon Sep 17 00:00:00 2001 From: stuppie Date: Fri, 16 Oct 2026 15:42:30 -0700 Subject: product manager allow returning all products (its paginated bro) --- generalresearch/managers/thl/product.py | 8 +++----- pyproject.toml | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/generalresearch/managers/thl/product.py b/generalresearch/managers/thl/product.py index fb893c6..eacec5b 100644 --- a/generalresearch/managers/thl/product.py +++ b/generalresearch/managers/thl/product.py @@ -436,11 +436,9 @@ class ProductManager(PostgresManager): params = {} filters = [] identifiers = [product_uuids, business_uuids, team_uuids] - assert sum([bool(x) for x in identifiers]) == 1, ( - "Must provide exactly one set of identifiers" - ) - identifier = next(x for x in identifiers if x) - assert all(is_valid_uuid(v) for v in identifier), "invalid uuid" + for identifier in identifiers: + if identifier is not None: + assert all(is_valid_uuid(v) for v in identifier), "invalid uuid" if product_uuids is not None: filters.append("bp.id = ANY(%(product_uuids)s)") diff --git a/pyproject.toml b/pyproject.toml index c165cd1..5b4e68f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "generalresearch" -version = "3.8.7" +version = "3.8.8" description = "Python Utilities for General Research" readme = "README.md" requires-python = ">=3.14" -- cgit v1.2.3