Ignore:
Timestamp:
03/07/12 15:09:46 (15 months ago)
Author:
Alberto Resco Perez <alberto.resco.perez@…>
Branches:
master, hello-world-walkthrough, ipv6, v0.98-series, v0.98.2, v0.98.3, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, 0da0c1403bae8e51d8229f460181c71b9e6dda72
Children:
3e6579
Parents:
bcf1d7
Message:

[IMP] Add visibility category path export

File:
1 edited

Legend:

Unmodified
Added
Removed
  • indico/util/fossilize/conversion.py

    r962919 r9d9d54  
    194194    def visibility(cls, conf): 
    195195        visibility = conf.getVisibility() 
     196        path = conf.getOwnerPath() 
    196197        if visibility == 0: 
    197198            id = "" 
    198199            name = "Nowhere" 
    199         elif visibility == 999: 
     200        elif visibility > len(path): 
    200201            id = "" 
    201202            name = "Everywhere" 
    202203        else: 
    203             categ = conf.getOwnerPath()[conf.getVisibility()-1] 
     204            try: 
     205                categ = path[conf.getVisibility()-1] 
     206            except: 
     207                raise Exception(conf.getVisibility()) 
    204208            id = categ.getId() 
    205209            name = categ.getTitle() 
Note: See TracChangeset for help on using the changeset viewer.