Ignore:
Timestamp:
10/07/10 17:22:30 (3 years ago)
Author:
Pedro Ferreira <jose.pedro.ferreira@…>
Branches:
master, burotel, hello-world-walkthrough, ipv6, v0.98-series, v0.98.2, v0.98.3, v0.98b1, v0.98b2, v0.99, b8c30da8ebdbdcbd675a873997cc3e95f567de49, 10eafd9ae230cbad5d99d5aaf22c24724fb6c98f
Children:
775b91
Parents:
b37548
Message:

[FIX] Put back string conversion for forms

  • It seems Indico suffers from this problem as well;
  • New handlers would fix this;
File:
1 edited

Legend:

Unmodified
Added
Removed
  • indico/web/wsgi/indico_wsgi_handler.py

    re0a1a1 r869d27  
    149149    return None 
    150150 
     151def _convert_to_string(form): 
     152    for key, value in form.items(): 
     153        ## FIXME: this is a backward compatibility workaround 
     154        ## because most of the old administration web handler 
     155        ## expect parameters to be of type str. 
     156        ## When legacy publisher will be removed all this 
     157        ## pain will go away anyway :-) 
     158        if isinstance(value, str): 
     159            form[key] = str(value) 
     160 
     161 
    151162def plugin_publisher(req, path): 
    152163    """ 
     
    155166    pluginMap = RHMap()._map 
    156167    form = dict(req.form) 
     168 
     169    _convert_to_string(form) 
    157170 
    158171    importList = pluginMap[path].split('.') 
     
    183196        ## used with the magic ** 
    184197        form = dict(req.form) 
     198 
     199        _convert_to_string(form) 
    185200 
    186201        try: 
Note: See TracChangeset for help on using the changeset viewer.