Skip to content

Commit

Permalink
Removing index logic from import.
Browse files Browse the repository at this point in the history
  • Loading branch information
BuildTools committed Oct 9, 2023
1 parent dc60e0a commit 9a7f123
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions api_v2/management/commands/import.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ class Command(BaseCommand):
def add_arguments(self, parser):
parser.add_argument("-d", "--dir", type=str,
help="Directory to write files to.")
parser.add_argument("--noindex", action="store_true", default=False,
help="Does not trigger search indexing")

def build_index(self):
self.stdout.write('Building search index.')
call_command('update_index', '--remove')


def handle(self, *args, **options) -> None:
Expand All @@ -35,6 +29,3 @@ def handle(self, *args, **options) -> None:
fixture_filepaths = glob.glob(options['dir'] + '/**/*.json', recursive=True)

call_command('loaddata', fixture_filepaths)

if not options['noindex']:
self.build_index()

0 comments on commit 9a7f123

Please sign in to comment.