]> git.openstreetmap.org Git - osqa.git/commitdiff
Avoids a strange error probably coming from either django or python.
authorhernani <hernani@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Tue, 13 Jul 2010 16:05:22 +0000 (16:05 +0000)
committerhernani <hernani@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Tue, 13 Jul 2010 16:05:22 +0000 (16:05 +0000)
git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@524 0cfe37f9-358a-4d5e-be75-b63607b5c754

forum/models/user.py

index 2e71868d8d1333f19a1a27bfd929d515606aeecc..fb13c27f7c5524c27b2aaa544d207f76ac978a97 100644 (file)
@@ -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):