Skip to content

Commit

Permalink
FIX: dictionary items
Browse files Browse the repository at this point in the history
  • Loading branch information
mboscolo committed Jan 3, 2024
1 parent 84df283 commit e688d89
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions plm/models/ir_attachment.py
Original file line number Diff line number Diff line change
Expand Up @@ -2549,10 +2549,9 @@ def appendItem(resDict, to_append):
return
else:
appendItem(out['to_check'], doc_dict_3d)
tmp_dict['options'] = {
'discard': 'Discard and check-in',
'keep_and_go': 'Keep check-out and check-in children'
}
tmp_dict['options'] = {'keep_and_go': 'Keep check-out and check-in children',
'discard': 'Discard and check-in'
}
if is_root:
if tmp_dict['check_in']:
if tmp_dict['plm_cad_open_newer']:
Expand All @@ -2563,9 +2562,8 @@ def appendItem(resDict, to_append):
appendItem(out['already_checkin'], tmp_dict)
elif tmp_dict['check_out_by_me']:
appendItem(out['to_check'], tmp_dict)
tmp_dict['options'] = {
'discard': 'Discard and check-in',
'keep_and_go': 'Keep check-out and check-in children'
tmp_dict['options'] = {'keep_and_go': 'Keep check-out and check-in children',
'discard': 'Discard and check-in',
}
else:
tmp_dict['msg'] = 'Document %r is in check-out by another user. Cannot check-in.' % (tmp_dict['name'])
Expand All @@ -2580,9 +2578,8 @@ def appendItem(resDict, to_append):
appendItem(out['already_checkin'], tmp_dict)
elif tmp_dict['check_out_by_me']:
appendItem(out['to_check'], tmp_dict)
tmp_dict['options'] = {
'discard': 'Discard and check-in',
'keep_and_go': 'Keep check-out and check-in children'
tmp_dict['options'] = {'keep_and_go': 'Keep check-out and check-in children',
'discard': 'Discard and check-in'
}
else:
tmp_dict['msg'] = 'Document %r is in check-out by another user. Cannot check-in, skipped.' % (tmp_dict['name'])
Expand Down

0 comments on commit e688d89

Please sign in to comment.