← Back to team overview

harvest-dev team mailing list archive

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

 

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

Requested reviews:
  harvest-dev (harvest-dev)
Related bugs:
  Bug #918172 in harvest: "Type mismatch in Harvest's updateopportunities"
  https://bugs.launchpad.net/harvest/+bug/918172

For more details, see:
https://code.launchpad.net/~dholbach/harvest/918172/+merge/89024
-- 
https://code.launchpad.net/~dholbach/harvest/918172/+merge/89024
Your team harvest-dev is requested to review the proposed merge of lp:~dholbach/harvest/918172 into lp:harvest.
=== modified file 'harvest/opportunities/management/commands/updateopportunities.py'
--- harvest/opportunities/management/commands/updateopportunities.py	2011-06-28 14:11:20 +0000
+++ harvest/opportunities/management/commands/updateopportunities.py	2012-01-18 12:59:23 +0000
@@ -25,18 +25,18 @@
                 for entry in entries:
                     sp, created = models.SourcePackage.objects.get_or_create(name=entry["source_package"])
                     try:
-                        opportunity = models.Opportunity.objects.get(description=entry["short_description"],
+                        opportunity = models.Opportunity.objects.get(description=str(entry["short_description"]),
                                                           url=entry["link"], sourcepackage=sp,
                                                           opportunitylist=op_list)
                     except models.Opportunity.DoesNotExist:
-                        opportunity = models.Opportunity(description=entry["short_description"],
+                        opportunity = models.Opportunity(description=str(entry["short_description"]),
                                                          url=entry["link"], sourcepackage=sp,
                                                          since=op_list.last_updated,
                                                          opportunitylist=op_list,
                                                          experience=op_list.experience)
                     opportunity.last_updated = op_list.last_updated
                     if entry.has_key("description"):
-                        opportunity.long_description = entry["description"]
+                        opportunity.long_description = str(entry["description"])
                     if entry.has_key("severity"):
                         opportunity.severity = entry["severity"]
                     opportunity.valid = True