reinit the tokenizer directory on website refresh

This means the project directory is usable again, once refresh --website
was run.
This commit is contained in:
Sarah Hoffmann
2022-03-20 17:49:22 +01:00
parent 54db1d8915
commit 4c66c35ed6

View File

@@ -117,6 +117,10 @@ class UpdateRefresh:
if args.website: if args.website:
webdir = args.project_dir / 'website' webdir = args.project_dir / 'website'
LOG.warning('Setting up website directory at %s', webdir) LOG.warning('Setting up website directory at %s', webdir)
# This is a little bit hacky: call the tokenizer setup, so that
# the tokenizer directory gets repopulated as well, in case it
# wasn't there yet.
self._get_tokenizer(args.config)
with connect(args.config.get_libpq_dsn()) as conn: with connect(args.config.get_libpq_dsn()) as conn:
refresh.setup_website(webdir, args.config, conn) refresh.setup_website(webdir, args.config, conn)