Skip to content

Commit

Permalink
Make script/import-all-data use run_all_import_scripts under the hood
Browse files Browse the repository at this point in the history
  • Loading branch information
zarino committed Nov 18, 2024
1 parent 52d73f0 commit 7000ec8
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions script/import-all-data
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,4 @@ set -e
# check that we are in the expected directory
cd `dirname $0`/..

./manage.py import_areas
./manage.py import_new_constituencies
./manage.py import_mps

COMMANDS=$(find hub/management/commands/ -name 'import_*' -printf '%f\n' | sed 's#[.]py##')

for COMMAND in $COMMANDS
do
if [ "$COMMAND" != "import_areas" ] && [ "$COMMAND" != "import_mps" ] && [ "$COMMAND" != "import_new_constituencies" ]; then
./manage.py "$COMMAND"
fi
done
script/dev-command ./manage.py run_all_import_scripts $@

0 comments on commit 7000ec8

Please sign in to comment.