Skip to content

Commit

Permalink
Add database default to dbrestore task (#588)
Browse files Browse the repository at this point in the history
  • Loading branch information
WillNilges authored Sep 22, 2024
1 parent 49224df commit c4f27fe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/meshapi/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def reset_dev_database() -> None:

try:
enable_flag("MAINTENANCE_MODE")
management.call_command("dbrestore", "--noinput")
management.call_command("dbrestore", "--noinput", "--database", "default")
management.call_command("scramble_members", "--noinput")
disable_flag("MAINTENANCE_MODE")
except Exception as e:
Expand Down
2 changes: 1 addition & 1 deletion src/meshapi/tests/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def test_run_reset_dev_database(self, mock_call_command_func):
os.environ["AWS_SECRET_ACCESS_KEY"] = "alsofake"
reset_dev_database()
mock_call_command_func.assert_has_calls(
[mock.call("dbrestore", "--noinput"), mock.call("scramble_members", "--noinput")]
[mock.call("dbrestore", "--noinput", "--database", "default"), mock.call("scramble_members", "--noinput")]
)

@mock.patch("django.core.management.call_command")
Expand Down

0 comments on commit c4f27fe

Please sign in to comment.