~anybox/prestashoperpconnect/7.0

« back to all changes in this revision

Viewing changes to prestashoperpconnect/unit/mapper.py

  • Committer: Clovis NZOUENDJOU
  • Date: 2014-04-02 15:21:13 UTC
  • Revision ID: nzouendjou2002@yahoo.fr-20140402152113-cd5c7l07sgmr3xlt
return to original

Show diffs side-by-side

added added

removed removed

Lines of Context:
635
635
        column = self.model._all_columns[from_attr].column
636
636
        if column._type == 'boolean':
637
637
            return res and 1 or 0
638
 
        if not res:
639
 
            if column._type in ('char', 'text', 'datetime', 'date', 'html'):
640
 
                return ""
641
 
            if column._type in ('integer', 'float'):
642
 
                return 0
643
638
        return res
644
639
 
645
640