Commits

David Chambers committed d08ddaa

Removed defensive code surrounding call to `get_num_posts` (version 1.1 of the Disqus API reversed the order of its return values).

Comments (0)

Files changed (1)

                 thread = dsq.get_thread_by_url(forum, BASE_URL.rstrip('/') + canon_url)
                 if not thread:
                     thread = dsq.thread_by_identifier(forum, context['meta']['title'], canon_url)['thread']
-                # don't trust the documentation!
-                # http://wiki.disqus.net/API#getnumposts.3A
-                num_posts = dsq.get_num_posts(forum, [thread])[thread.id]
-                num_total_posts = max(num_posts)
-                num_visible_posts = min(num_posts)
+                num_total_posts, num_visible_posts = dsq.get_num_posts(forum, [thread])[thread.id]
 
                 if request.method == 'POST':
                     form = CommentForm(request.POST)