temporary fix for unicode error with users

This commit is contained in:
tkupek 2016-03-19 19:17:49 +01:00
parent 266e579825
commit 3615ffb336

View file

@ -1,3 +1,4 @@
# coding=utf-8
from __future__ import unicode_literals from __future__ import unicode_literals
import hashlib import hashlib
@ -78,7 +79,7 @@ class UserAnswer(models.Model):
correct = models.NullBooleanField(null=True) correct = models.NullBooleanField(null=True)
def __unicode__(self): def __unicode__(self):
return str(self.user) + " - " + str(self.question.id) return ""
class Meta: class Meta:
unique_together = (('user', 'question'),) unique_together = (('user', 'question'),)
@ -92,4 +93,4 @@ class UserAnswerOptions(models.Model):
unique_together = (('user_answer', 'option'),) unique_together = (('user_answer', 'option'),)
def __unicode__(self): def __unicode__(self):
return str(self.user_answer) + " - " + str(self.option) return unicode(str(self.user_answer) + " - " + str(self.option), "utf-8")