From 1a5f87a81df9717156ba65804a998ad231066e87 Mon Sep 17 00:00:00 2001 From: hernani Date: Tue, 13 Jul 2010 16:05:22 +0000 Subject: [PATCH] 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 --- forum/models/user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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): -- 2.39.5