Ticket #9303: 9303_hasattr.diff
| File 9303_hasattr.diff, 0.8 kB (added by thejaswi_puthraya, 1 year ago) |
|---|
-
a/django/contrib/comments/templatetags/comments.py
old new 80 80 content_type = ctype, 81 81 object_pk = smart_unicode(object_pk), 82 82 site__pk = settings.SITE_ID, 83 is_public = True,84 83 ) 85 if getattr(settings, 'COMMENTS_HIDE_REMOVED', True): 84 if hasattr(self.comment_model,'is_public'): 85 qs.filter(is_public=True) 86 if getattr(settings, 'COMMENTS_HIDE_REMOVED', True) and hasattr(self.comment_model, 'is_removed'): 86 87 qs = qs.filter(is_removed=False) 87 88 88 89 return qs
