Last change
on this file since 4682 was
414,
checked in by lregebro, 18 years ago
|
Added an upgrade step for accomodation tool to accommodation tool.
|
-
Property svn:keywords set to
Id
|
File size:
610 bytes
|
Rev | Line | |
---|
[414] | 1 | # $Id: upgrade.py 414 2006-08-24 11:10:59Z lregebro $ |
---|
| 2 | |
---|
| 3 | # Upgrade steps |
---|
| 4 | |
---|
| 5 | old_tool_id = 'portal_accomodation' |
---|
| 6 | |
---|
| 7 | def rename_accommodation_tool(portal): |
---|
| 8 | required = portal.portal_setup._toolset_registry._required |
---|
| 9 | if required.has_key(old_tool_id): |
---|
| 10 | del required[old_tool_id] |
---|
| 11 | if old_tool_id in portal.objectIds(): |
---|
| 12 | portal.manage_delObjects([old_tool_id]) |
---|
| 13 | |
---|
| 14 | def check_accommodation_tool(portal): |
---|
| 15 | required = portal.portal_setup._toolset_registry._required |
---|
| 16 | key = 'Products.WAeUP_SRP.WAeUPTables.AccomodationTable' |
---|
| 17 | if required.has_key(old_tool_id) or old_tool_id in portal.objectIds(): |
---|
| 18 | return True |
---|
| 19 | return False |
---|
| 20 | |
---|
Note: See
TracBrowser for help on using the repository browser.