Changeset 3029 in products


Ignore:
Timestamp:
Nov 17, 2010 4:28:48 PM (10 years ago)
Author:
fenix
Message:

added quick validation fix for forms, added MANIFEST.in file

Location:
quintagroup.analytics/trunk
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.analytics/trunk/quintagroup/analytics/browser/views.py

    r3021 r3029  
    315315    def getPortlets(self): 
    316316        level = self.request.form.get('level', 1) 
    317         level = int(level) 
     317        try: 
     318            level = level and int(level) or 1 
     319        except ValueError: 
     320            level = 1 
    318321        infos = [] 
    319322        for i in self._walk(self.context, level): 
     
    379382    def getPropsList(self): 
    380383        level = self.request.form.get('level', 1) 
    381         level = int(level) 
     384        try: 
     385            level = level and int(level) or 1 
     386        except ValueError: 
     387            level = 1 
    382388        infos = [] 
    383389        for i in self._walk(self.context, level): 
     
    499505    def getPropsList(self): 
    500506        level = self.request.form.get('level', 1) 
    501         level = int(level) 
     507        try: 
     508            level = level and int(level) or 1 
     509        except ValueError: 
     510            level = 1 
    502511        infos = [] 
    503512        for i in self._walk(self.context, level): 
Note: See TracChangeset for help on using the changeset viewer.