Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Fix #1362
Jakub Draganekc3e3f8469d01
diff --git a/saleor/core/management/commands/populatedb.py b/saleor/core/management/commands/populatedb.pyindex 2dbfc3948c..7cd6e24a7a 100644--- a/saleor/core/management/commands/populatedb.py+++ b/saleor/core/management/commands/populatedb.py@@ -2,6 +2,7 @@ from __future__ import unicode_literalsfrom django.core.management import call_commandfrom django.core.management.base import BaseCommand+from django.conf import settingsfrom django.db import connectionfrom ...utils.random_data import (@@ -47,7 +48,8 @@ class Command(BaseCommand):cursor.execute('PRAGMA synchronous = OFF;')def populate_search_index(self):- call_command('search_index', '--rebuild', force=True)+ if settings.ELASTICSEARCH_URL:+ call_command('search_index', '--rebuild', force=True)def handle(self, *args, **options):self.make_database_faster()