Ignore:
Timestamp:
01/08/12 11:17:27 (8 years ago)
Author:
mnagni
Message:

Fixed a bug in objectEncoding

File:
1 edited

Legend:

Unmodified
Added
Removed
  • mauRepo/MolesManager/trunk/src/libs/epb.py

    r8460 r8480  
    3333from sqlalchemy.orm import subqueryload 
    3434from sqlalchemy.sql.expression import text 
    35 from MolesManager.forms.date import methodsWithDecorator 
    3635from sqlalchemy.orm.util import identity_key 
     36from MolesManager.djencoder import methodsWithDecorator 
    3737 
    3838class EPB(object): 
     
    206206    @classmethod 
    207207    def _drillALLData(cls, obj): 
    208         if obj is None: 
     208        if obj is None or isPrimitive(obj): 
    209209            return 
     210         
    210211        if isinstance(obj, list): 
    211212            for element in obj: 
     
    222223                    pass 
    223224         
     225def isPrimitive(obj): 
     226    # Is a simple primitive? 
     227    return obj is None \ 
     228            or isinstance(obj, str) \ 
     229            or isinstance(obj, int) \ 
     230            or isinstance(obj, unicode) 
Note: See TracChangeset for help on using the changeset viewer.