Commit 4ade440e authored by Fabien Morin's avatar Fabien Morin

- add a condition for cases where form.group_list is empty (rename group only

  if there is already at least one).
- correct a mistake : close() method was called on a string object instead of
  the file. 


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19018 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent da9540e6
...@@ -217,11 +217,12 @@ class ManageModule: ...@@ -217,11 +217,12 @@ class ManageModule:
# default_groups list completed, need to update the form_groups # default_groups list completed, need to update the form_groups
# rename the first group because it can't be removed # rename the first group because it can't be removed
form.rename_group(form.group_list[0], default_groups[0]) if len(form.group_list):
form.rename_group(form.group_list[0], default_groups[0])
# add other groups # add other groups
if len(default_groups) > 1: for group in default_groups:
for group in default_groups[1:]: if group not in form.group_list:
form.add_group(group) form.add_group(group)
form_view_id_object.rename_group('Default', default_groups[0]) form_view_id_object.rename_group('Default', default_groups[0])
...@@ -693,7 +694,7 @@ class ManageFiles: ...@@ -693,7 +694,7 @@ class ManageFiles:
# this line permit to delete tempory files (about 24 Mo for each file !) # this line permit to delete tempory files (about 24 Mo for each file !)
# it's temporary because this function mus be rewrited or deleted # it's temporary because this function mus be rewrited or deleted
# (perhaps setBackgroundPictures could return attributes list) # (perhaps setBackgroundPictures could return attributes list)
ScribusUtilsOriginaltempsPPMName.close() ScribusUtilsOriginaltempsPPM.close()
pg_nbr = len(original_result[1].split('\n')) pg_nbr = len(original_result[1].split('\n'))
real_size_x = {} real_size_x = {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment