Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Frederic Thoma
erp5
Commits
dc8af01f
Commit
dc8af01f
authored
Sep 24, 2014
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Plain Diff
erp5_administration: fix script to delete obsolete BT now that revisions aren't integers anymore
parents
92d289fa
0d9da371
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/TemplateTool_deleteObsoleteTemplateList.xml
...dministration/TemplateTool_deleteObsoleteTemplateList.xml
+8
-5
No files found.
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/TemplateTool_deleteObsoleteTemplateList.xml
View file @
dc8af01f
...
...
@@ -61,11 +61,14 @@ for bt in bt_list:\n
if installation_state in (\'deleted\', \'replaced\'):\n
delete_list.append(bt_id)\n
elif installation_state == \'not_installed\':\n
if len([x for x in bt_list \\\n
if x.getTitle() == bt.getTitle() and \\\n
x.getInstallationState() in (\'installed\', \'not_installed\') and \\\n
int(x.getRevision() or \'0\') >
int(bt.getRevision() or \'0\')]):\n
title = bt.getTitle()\n
modification_date = bt.getModificationDate()\n
for x in bt_list:\n
if (x.getTitle() == title and\n
x.getInstallationState() in (\'installed\', \'not_installed\') and\n
x.getModificationDate() >
modification_date):\n
delete_list.append(bt_id)\n
break\n
\n
print \'Deleted id list:%r\' % delete_list\n
portal_templates.manage_delObjects(delete_list)\n
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment