Skip to content

Commit b2c6641

Browse files
committed
Fix for loading MRS dumps
Change-Id: Ied32779f248ace4afb378000a6fb893d5fcdf008
1 parent 5999324 commit b2c6641

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

mrs_plugin/dump.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def load(path, **kwargs):
196196
# TODO(rennox): Dump upgrade logic is triggered here
197197
pass
198198

199-
grants = []
199+
grantList = []
200200
with lib.core.MrsDbTransaction(session):
201201
if target_object == "service":
202202
service = lib.services.get_service(
@@ -205,17 +205,18 @@ def load(path, **kwargs):
205205
session, service["host_ctx"] + content["schema"]["request_path"])
206206
_, grant = lib.dump.load_schema_dump(
207207
session, object_id, content["schema"], reuse_ids)
208-
grants = grants + grant
208+
grantList = grantList + grant
209209
elif target_object == "schema":
210210
schema = lib.schemas.get_schema(session, schema_id=object_id)
211211
lib.core.check_request_path(session,
212212
schema["host_ctx"] + schema["request_path"] + content["object"]["request_path"])
213213
_, grant = lib.dump.load_object_dump(
214214
session, object_id, content["object"], reuse_ids)
215-
grants.append(grant)
215+
grantList.append(grant)
216216

217-
for grant in grants:
218-
lib.core.MrsDbExec(grant).exec(session)
217+
for grants in grantList:
218+
for grant in grants:
219+
lib.core.MrsDbExec(grant).exec(session)
219220

220221

221222
@plugin_function('mrs.load.schema', shell=True, cli=True, web=True)

0 commit comments

Comments
 (0)