temporary fix for unicode error with users
This commit is contained in:
parent
266e579825
commit
3615ffb336
1 changed files with 3 additions and 2 deletions
|
@ -1,3 +1,4 @@
|
|||
# coding=utf-8
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import hashlib
|
||||
|
@ -78,7 +79,7 @@ class UserAnswer(models.Model):
|
|||
correct = models.NullBooleanField(null=True)
|
||||
|
||||
def __unicode__(self):
|
||||
return str(self.user) + " - " + str(self.question.id)
|
||||
return ""
|
||||
|
||||
class Meta:
|
||||
unique_together = (('user', 'question'),)
|
||||
|
@ -92,4 +93,4 @@ class UserAnswerOptions(models.Model):
|
|||
unique_together = (('user_answer', 'option'),)
|
||||
|
||||
def __unicode__(self):
|
||||
return str(self.user_answer) + " - " + str(self.option)
|
||||
return unicode(str(self.user_answer) + " - " + str(self.option), "utf-8")
|
||||
|
|
Loading…
Reference in a new issue