diff --git a/ckanext/discourse/plugin.py b/ckanext/discourse/plugin.py index cf8d97a..9935733 100644 --- a/ckanext/discourse/plugin.py +++ b/ckanext/discourse/plugin.py @@ -142,21 +142,8 @@ def discourse_comments(self, pkg_dict=None): return '' def discourse_comments_count(self, pkg_dict=None): - """Get comment count from Discourse.""" - try: - pkg = pkg_dict or toolkit.g.pkg_dict - topic_id = pkg.get('topic_id') - - if not (self.settings and topic_id): - return 0 - - api = DiscourseApi(self.settings) - count = api.get_topic_comment_count(topic_id) - return count - - except Exception as e: - log.error(f"Error getting comment count: {str(e)}") - return 0 + """Disabled: always return 0; never touches g.pkg_dict or calls HTTP.""" + return 0 def discourse_is_configured(self): """Check if Discourse is properly configured."""