← Back to team overview

harvest-dev team mailing list archive

[Merge] lp:~dholbach/harvest/922569 into lp:harvest

 

Daniel Holbach has proposed merging lp:~dholbach/harvest/922569 into lp:harvest.

Requested reviews:
  harvest-dev (harvest-dev)
Related bugs:
  Bug #922569 in harvest: "'ascii' codec can't encode character u'\xf3' in position 86: ordinal not in range(128)"
  https://bugs.launchpad.net/harvest/+bug/922569

For more details, see:
https://code.launchpad.net/~dholbach/harvest/922569/+merge/90480
-- 
https://code.launchpad.net/~dholbach/harvest/922569/+merge/90480
Your team harvest-dev is requested to review the proposed merge of lp:~dholbach/harvest/922569 into lp:harvest.
=== modified file 'harvest/opportunities/management/commands/updateopportunities.py'
--- harvest/opportunities/management/commands/updateopportunities.py	2012-01-18 12:55:29 +0000
+++ harvest/opportunities/management/commands/updateopportunities.py	2012-01-27 16:44:37 +0000
@@ -35,8 +35,8 @@
                                                          opportunitylist=op_list,
                                                          experience=op_list.experience)
                     opportunity.last_updated = op_list.last_updated
-                    if entry.has_key("description"):
-                        opportunity.long_description = str(entry["description"])
+                    if entry.has_key("description") and type(entry["description"]) not in [ str, unicode ]:
+                            opportunity.long_description = unicode(entry["description"])
                     if entry.has_key("severity"):
                         opportunity.severity = entry["severity"]
                     opportunity.valid = True