Changeset 2331 for WAeUP_SRP/base


Ignore:
Timestamp:
8 Oct 2007, 16:28:55 (17 years ago)
Author:
joachim
Message:

fix reimporting of catalogs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/PatchCatalogToolXMLAdapter.py

    r1936 r2331  
    1919        self._purgeColumns()
    2020    columns = []
    21     for col in self._extractColumns()._get_childNodes():
    22         columns.append(col.attributes.items()[0][1])
     21    # for col in self._extractColumns()._get_childNodes():
     22    #     columns.append(col.attributes.items()[0][1])
     23    for col in self.context.schema():
     24        columns.append(col)
    2325    inds = {}
    24     for ind in self._extractIndexes()._get_childNodes():
    25         inds[ind.attributes.items()[1][1]] = ind.attributes.items()[0][1]
     26    # for ind in self._extractIndexes()._get_childNodes():
     27    #     inds[ind.attributes.items()[1][1]] = ind.attributes.items()[0][1]
     28    for ind in self.context.getIndexObjects():
     29        inds[ind.getId()] = ind.meta_type
    2630    if meta_type in ('CMF Catalog',"WAeUP Table"):
     31        self._logger.info("Working on %s"  % na[1][1])
    2732        for ch in node._get_childNodes():
    2833            if ch.nodeName in ('index',):
     
    4449                continue
    4550    if something_changed :
     51        #import pdb;pdb.set_trace()
    4652        self._logger.info("Catalog tool %s cleared."  % na[1][1])
    4753        self._logger.info("%s modified." % na[1][1])
    4854        self._initProperties(node)
    49         self._initObjects(node)
    5055        if new_indexes and len(self.context()) == 0: #disable creation of new indexes if records in the table
     56            self._initObjects(node)
    5157            self._initIndexes(node)
    5258        self._initColumns(node)
Note: See TracChangeset for help on using the changeset viewer.