Ignore:
Timestamp:
12/02/09 17:32:22 (11 years ago)
Author:
cbyrom
Message:

Adjust granulite to ensure that granule atoms are validated before
they are created - and add code to properly deal with validation errors.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • MILK/trunk/milk_server/milk_server/controllers/atom_editor/editatom.py

    r4959 r4964  
    150150            logging.info(" - inputs invalid") 
    151151            c.errors = e.unpack_errors() 
     152        except ValidationError, e: 
     153            logging.info(e) 
     154            self._unpackErrors(e) 
     155             
    152156        except Exception, e: 
    153157            c.errors['WARNING'] = ['Error loading data: the displayed data will not be saved - please fix problem and retry'] 
     
    640644        logging.info("Setting up new atom from granulite template") 
    641645        c.title='Create new data granule atom - from a granulite file' 
    642         c.errors = {} 
     646 
     647        if not hasattr(c, 'errors'): 
     648            c.errors = {} 
    643649        try: 
    644650            return self.savePageAndRender('atom_editor/atom_granulator', **inputs) 
Note: See TracChangeset for help on using the changeset viewer.