Ignore:
Timestamp:
17/11/08 17:30:42 (11 years ago)
Author:
cbyrom
Message:

Add inputs checking to avoid unecessary errors being thrown when revisiting
page in wrong state - instead redirect back to home page.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/controllers/listatom.py

    r4348 r4432  
    7575                c.searchData = searchData 
    7676                self.__setup() 
    77                 atomTypeID = inputs.get('atomTypeID').split('--')[1] 
    78                 providerID = inputs.get('providerID').split('--')[1] 
     77                atomTypeID = inputs.get('atomTypeID') 
     78                providerID = inputs.get('providerID') 
     79                # NB, avoid page being reloaded in incorrect state - e.g. after 
     80                # browser reload 
     81                if not (atomTypeID and providerID): 
     82                    return self.atomHome() 
     83                     
     84                atomTypeID = atomTypeID.split('--')[1] 
     85                providerID = providerID.split('--')[1] 
    7986                c.results = self.searchAtoms(providerID, atomTypeID, inputs.get('title')) 
    8087                 
Note: See TracChangeset for help on using the changeset viewer.