Features: None;

Fixes: 1) Standardize string quotes in migration file; 2) Fix redundant parentheses in Elasticsearch query execution;

Extra: Format cleanup and minor readability improvements.
This commit is contained in:
Egor Pavlovich Gorbunov 2025-11-04 14:41:01 +03:00
parent 9898212855
commit 0dcee7fefe
2 changed files with 5 additions and 8 deletions

View file

@ -267,9 +267,7 @@ def process_query(
] ]
for qx in product_exact_sequence: for qx in product_exact_sequence:
try: try:
resp_exact = ( resp_exact = Search(index=["products"]).query(qx).extra(size=5, track_total_hits=False).execute()
Search(index=["products"]).query(qx).extra(size=5, track_total_hits=False).execute()
)
except NotFoundError: except NotFoundError:
resp_exact = None resp_exact = None
if resp_exact is not None and getattr(resp_exact, "hits", None): if resp_exact is not None and getattr(resp_exact, "hits", None):

View file

@ -4,15 +4,14 @@ from django.db import migrations, models
class Migration(migrations.Migration): class Migration(migrations.Migration):
dependencies = [ dependencies = [
('core', '0051_stock_system_attributes'), ("core", "0051_stock_system_attributes"),
] ]
operations = [ operations = [
migrations.AlterField( migrations.AlterField(
model_name='stock', model_name="stock",
name='system_attributes', name="system_attributes",
field=models.JSONField(blank=True, default=dict, verbose_name='system attributes'), field=models.JSONField(blank=True, default=dict, verbose_name="system attributes"),
), ),
] ]