X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/303b118d8ffc0ed2285166e362a91774f64ad807..1a5f87a81df9717156ba65804a998ad231066e87:/forum/models/user.py 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):