From: hernani Date: Tue, 13 Jul 2010 16:05:22 +0000 (+0000) Subject: Avoids a strange error probably coming from either django or python. X-Git-Tag: live~610 X-Git-Url: https://git.openstreetmap.org./osqa.git/commitdiff_plain/1a5f87a81df9717156ba65804a998ad231066e87 Avoids a strange error probably coming from either django or python. git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@524 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- diff --git a/forum/models/user.py b/forum/models/user.py index 2e71868..fb13c27 100644 --- a/forum/models/user.py +++ b/forum/models/user.py @@ -315,7 +315,7 @@ class User(BaseModel, DjangoUser): return self.can_delete_comment(post) return (self == post.author and (post.__class__.__name__ == "Answer" or - not post.answers.exclude(author=self).count())) + not post.answers.exclude(author__id=self.id).count())) @true_if_is_super_or_staff def can_upload_files(self):