Features: 1) Enforce LF line endings for .sh files using .gitattributes; 2) Add filtering of attributes and products based on active status in querysets.
Fixes: none; Extra: none;
This commit is contained in:
parent
8d2ce5b013
commit
95a0958292
2 changed files with 5 additions and 0 deletions
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
*.sh text eol=lf
|
||||
|
|
@ -354,7 +354,9 @@ class Category(ExportModelOperationsMixin("category"), NiceModel, MPTTModel): #
|
|||
rows = (
|
||||
AttributeValue.objects.annotate(value_length=Length("value"))
|
||||
.filter(
|
||||
product__is_active=True,
|
||||
product__category_id__in=cat_ids,
|
||||
attribute__is_active=True,
|
||||
attribute__is_filterable=True,
|
||||
value_length__lte=30,
|
||||
)
|
||||
|
|
@ -394,7 +396,9 @@ class Category(ExportModelOperationsMixin("category"), NiceModel, MPTTModel): #
|
|||
rows = (
|
||||
AttributeValue.objects.annotate(value_length=Length("value"))
|
||||
.filter(
|
||||
product__is_active=True,
|
||||
product__category=self,
|
||||
attribute__is_active=True,
|
||||
attribute__is_filterable=True,
|
||||
value_length__lte=30,
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue