[product cache] add not replace
All checks were successful
Python lint and test / linttest (push) Successful in 4m37s

This commit is contained in:
Piotr Domański 2024-08-09 14:12:58 +02:00
parent e2af49046c
commit 29445273ca

View file

@ -129,7 +129,8 @@ class Product(Base, CommonMixin):
)
)
.values(
usage_count_cached=select(func.count(Entry.id)).where(
usage_count_cached=cls.usage_count_cached
+ select(func.count(Entry.id)).where(
Entry.product_id == cls.id,
Entry.processed == False,
)