Skip to content

Commit

Permalink
Use pop function to delete parent keys
Browse files Browse the repository at this point in the history
  • Loading branch information
vkuznet committed Jul 28, 2022
1 parent 58b2dd8 commit fe1af34
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Server/Python/src/dbs/business/DBSBlockInsert.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,8 @@ def insertBlockFile(self, blockcontent, datasetId, migration=False):
hasFparentage = True
if migration:
fileParentList[k]['this_file_id'] = logicalFileName[fileParentList[k]['this_logical_file_name']]
if 'this_logical_file_name' in fileParentList[k]:
del fileParentList[k]['this_logical_file_name']
if 'parent_file_id' in fileParentList[k]:
del fileParentList[k]['parent_file_id']
fileParentList[k].pop('this_logical_file_name', None)
fileParentList[k].pop('parent_file_id', None)
else:
fileParentList[k]['this_file_id'] = logicalFileName[fileParentList[k]['logical_file_name']]
del fileParentList[k]['logical_file_name']
Expand Down

0 comments on commit fe1af34

Please sign in to comment.