Skip to content

Commit 1f24e60

Browse files
authored
Merge pull request django-fluent#3 from cloudregistry/fix-attribute-err
Fix AttributeError when no comments app installed
2 parents 85ddbdd + c1ecca0 commit 1f24e60

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fluent_utils/softdeps/comments.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def get_comments_are_open(instance):
7878
"""
7979
Check if comments are open for the instance
8080
"""
81-
if CommentModel is None:
81+
if not moderator or not CommentModel:
8282
return False
8383

8484
try:
@@ -97,7 +97,7 @@ def get_comments_are_moderated(instance):
9797
"""
9898
Check if comments are moderated for the instance
9999
"""
100-
if CommentModel is None:
100+
if not moderator or not CommentModel:
101101
return False
102102

103103
try:

0 commit comments

Comments
 (0)