Skip to content

Commit

Permalink
Set opts correctly when revision --autogenerate is used (#463)
Browse files Browse the repository at this point in the history
  • Loading branch information
RazerM authored May 19, 2022
1 parent 961a9d3 commit f7f15e2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/flask_migrate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ def revision(directory=None, message=None, autogenerate=False, sql=False,
head='head', splice=False, branch_label=None, version_path=None,
rev_id=None):
"""Create a new revision file."""
config = current_app.extensions['migrate'].migrate.get_config(directory)
opts = ['autogenerate'] if autogenerate else None
config = current_app.extensions['migrate'].migrate.get_config(
directory, opts=opts)
command.revision(config, message, autogenerate=autogenerate, sql=sql,
head=head, splice=splice, branch_label=branch_label,
version_path=version_path, rev_id=rev_id)
Expand Down

0 comments on commit f7f15e2

Please sign in to comment.