Skip to content

Commit

Permalink
Move init_app() out of main() and let it run right before main()
Browse files Browse the repository at this point in the history
  • Loading branch information
cslzchen committed Aug 19, 2019
1 parent 4c5a0ad commit 5b4fb8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/populate_institutions.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ def main(default_args=False):
'existing records: {}.'.format(diff_list))
sys.exit(1)

init_app(routes=False)
with transaction.atomic():
for inst_data in institutions_to_update:
update_or_create(inst_data)
Expand Down Expand Up @@ -1665,4 +1664,5 @@ def main(default_args=False):

if __name__ == '__main__':

init_app(routes=False)
main(default_args=False)

0 comments on commit 5b4fb8d

Please sign in to comment.