@@ -196,7 +196,7 @@ def load(path, **kwargs):
196
196
# TODO(rennox): Dump upgrade logic is triggered here
197
197
pass
198
198
199
- grants = []
199
+ grantList = []
200
200
with lib .core .MrsDbTransaction (session ):
201
201
if target_object == "service" :
202
202
service = lib .services .get_service (
@@ -205,17 +205,18 @@ def load(path, **kwargs):
205
205
session , service ["host_ctx" ] + content ["schema" ]["request_path" ])
206
206
_ , grant = lib .dump .load_schema_dump (
207
207
session , object_id , content ["schema" ], reuse_ids )
208
- grants = grants + grant
208
+ grantList = grantList + grant
209
209
elif target_object == "schema" :
210
210
schema = lib .schemas .get_schema (session , schema_id = object_id )
211
211
lib .core .check_request_path (session ,
212
212
schema ["host_ctx" ] + schema ["request_path" ] + content ["object" ]["request_path" ])
213
213
_ , grant = lib .dump .load_object_dump (
214
214
session , object_id , content ["object" ], reuse_ids )
215
- grants .append (grant )
215
+ grantList .append (grant )
216
216
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 )
219
220
220
221
221
222
@plugin_function ('mrs.load.schema' , shell = True , cli = True , web = True )
0 commit comments