Skip to content

Commit 265d5aa

Browse files
committed
Don't require to run this in maintenance mode
1 parent ac61e35 commit 265d5aa

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

rbac/migration_tool/migrate.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,8 @@ def migrate_data(
144144
exclude_apps: list = [], orgs: list = [], write_relationships: str = "False", skip_roles: bool = False
145145
):
146146
"""Migrate all data for all tenants."""
147-
# Only run this in maintanence mode or
148-
# if we don't write relationships (testing out the migration and clean up the created bindingmappings)
149-
# TODO: this condition needs to be removed to use migrator without maintenance mode.
150-
if not settings.READ_ONLY_API_MODE and write_relationships != "False":
147+
# Run this if we don't write relationships (testing out the migration and clean up the created bindingmappings)
148+
if write_relationships != "False":
151149
logger.fatal("Read-only API mode is required. READ_ONLY_API_MODE must be set to true.")
152150
return
153151

0 commit comments

Comments
 (0)