Browse Source

Update better_zip.py

Bugfixing name => cast to str all elements if exists.
pull/59/head
cesar-andres 10 years ago
parent
commit
816031176c
  1. 2
      base_location/better_zip.py

2
base_location/better_zip.py

@ -4,6 +4,7 @@
# Author: Nicolas Bessi. Copyright Camptocamp SA # Author: Nicolas Bessi. Copyright Camptocamp SA
# Contributor: Pedro Manuel Baeza <pedro.baeza@serviciosbaeza.com> # Contributor: Pedro Manuel Baeza <pedro.baeza@serviciosbaeza.com>
# Ignacio Ibeas <ignacio@acysos.com> # Ignacio Ibeas <ignacio@acysos.com>
# Cesar Andres <cesar-andres.sanchez@brain-tec.ch>
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as # it under the terms of the GNU Affero General Public License as
@ -51,6 +52,7 @@ class BetterZip(orm.Model):
name.append(bzip.state_id.name) name.append(bzip.state_id.name)
if bzip.country_id: if bzip.country_id:
name.append(bzip.country_id.name) name.append(bzip.country_id.name)
name = [str(x) for x in name if x]
res.append((bzip.id, ", ".join(name))) res.append((bzip.id, ", ".join(name)))
return res return res

Loading…
Cancel
Save