Skip to content
Browse files

merge

  • Loading branch information...
2 parents 1092644 + 829d62e commit 0518f407b80d3635cc59154812cf6294be390077 @yekibud yekibud committed Jun 11, 2012
Showing with 11 additions and 7 deletions.
  1. +7 −6 helpdesk/management/commands/get_email.py
  2. +4 −1 scripts/migrate_taggit_to_tagging.py
View
13 helpdesk/management/commands/get_email.py
@@ -237,12 +237,13 @@ def ticket_from_message(message, queue, quiet):
if ticket == None:
from BeautifulSoup import UnicodeDammit
- converted = UnicodeDammit(body_html)
- if not converted.unicode:
- raise UnicodeDecodeError(
- "Failed to detect encoding, tried [%s]",
- ', '.join(converted.triedEncodings))
- body_html = converted.unicode
+ if body_html:
+ converted = UnicodeDammit(body_html)
+ if not converted.unicode:
+ raise UnicodeDecodeError(
+ "Failed to detect encoding, tried [%s]",
+ ', '.join(converted.triedEncodings))
+ body_html = converted.unicode
t = Ticket(
title=subject,
View
5 scripts/migrate_taggit_to_tagging.py
@@ -1,4 +1,4 @@
-#!/opt/snfc/dashboard/bin/python
+#!/opt/snfc/projects/bin/python
import os, sys
sys.path.append(os.path.abspath('/opt/snfc/projects/conf'))
@@ -11,4 +11,7 @@
for tagged_item in TaggedItem.objects.all():
tagged_item.content_object.tags += " %s" % tagged_item.tag.name
+ print tagged_item.tag.name
+ print tagged_item.content_object
+ print tagged_item.content_object.tags
tagged_item.content_object.save()

0 comments on commit 0518f40

Please sign in to comment.
Something went wrong with that request. Please try again.