Changeset 7fae23 in indico


Ignore:
Timestamp:
04/26/12 10:43:19 (14 months ago)
Author:
Pedro Ferreira <jose.pedro.ferreira@…>
Branches:
master, hello-world-walkthrough, ipv6, v0.99, b8c30da8ebdbdcbd675a873997cc3e95f567de49, 4287315ec967a3da168d83963c14001db8487d53
Children:
ad6543
Parents:
87fc67
Message:

[FIX] Unnecessary commit

  • visibility was being set on every access to getVisibility() for the home category, due to a try..except clause;
Location:
indico/MaKaC
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • indico/MaKaC/common/db.py

    rbce3a4 r7fae23  
    3535from MaKaC.consoleScripts.installBase import getIndicoInstallMode 
    3636skip_imports = getIndicoInstallMode() 
     37 
    3738 
    3839if not skip_imports: 
     
    111112        self._conn.conn = None 
    112113 
    113  
    114114    def startRequest( self ): 
    115115        """Initialise the DB and starts a new transaction. 
  • indico/MaKaC/conference.py

    ra829f8 r7fae23  
    826826 
    827827    def getVisibility ( self ): 
    828         # TODO: Check if this actually works 
    829         # since getOwner() can be None (root categ) 
    830         try: 
    831             return max(0,min(int(self._visibility), self.getOwner().getVisibility()+1)) 
    832         except: 
    833             self._visibility = 999 
    834             return 999 
     828        """ 
     829        Returns category visibility, considering that it can be 
     830        restricted by parent categories 
     831        """ 
     832        owner = self.getOwner() 
     833        visibility = int(self._visibility) 
     834 
     835        # visibility can be restricted by parent categories 
     836        if owner: 
     837            return max(0, min(visibility, owner.getVisibility() + 1)) 
     838        else: 
     839            return visibility 
    835840 
    836841    def setVisibility( self, visibility=999 ): 
  • indico/MaKaC/webinterface/rh/base.py

    r8cde5f r7fae23  
    504504        if self._checkHttpsRedirect(): 
    505505            return 
     506 
    506507 
    507508        DBMgr.getInstance().startRequest() 
  • indico/MaKaC/webinterface/rh/categoryDisplay.py

    r31e017 r7fae23  
    553553        self._req.content_type = """%s"""%(mimetype) 
    554554        self._req.headers_out["Content-Disposition"] = """inline; filename="%s\""""%filename.replace("\r\n"," ") 
     555 
    555556        return data 
    556557 
     
    580581        mimetype = cfg.getFileTypeMimeType( "ATOM" ) 
    581582        self._req.content_type = """%s"""%(mimetype) 
     583 
    582584        return data 
    583585 
Note: See TracChangeset for help on using the changeset viewer.