source: WAeUP_SRP/branches/joachim-azax-branch/upgrade.py @ 2932

Last change on this file since 2932 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
Line 
1# $Id: upgrade.py 414 2006-08-24 11:10:59Z lregebro $
2
3# Upgrade steps
4
5old_tool_id = 'portal_accomodation'
6
7def 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       
14def 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.