Ignore:
Timestamp:
21.07.2010 22:19:32 (22 months ago)
Author:
zmsdev
Message:

Added support for defaults of mandatory sub-objects, insert-commands and programmatic zexp import.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ZMS/trunk/ZMSMetaobjManager.py

    r1113 r1122  
    4747def syncType( self, meta_id, attr): 
    4848  try: 
    49     if attr['type'] == 'resource': 
     49    if (attr['type'] in ['resource']) or \ 
     50       (attr.get('mandatory',0)==1 and attr['type'] in self.getMetaobjIds()): 
    5051      ob = getattr( self, meta_id+'.'+attr['id'], None) 
    5152      if ob is not None: 
     
    751752       
    752753      # Handle resources. 
    753       if newType == 'resource': 
     754      if (newType in ['resource']) or \ 
     755         (newMandatory and newType in self.getMetaobjIds()): 
    754756        if isinstance( newCustom, _blobfields.MyFile): 
    755757          if oldId is not None and id+'.'+oldId in self.objectIds(): 
Note: See TracChangeset for help on using the changeset viewer.