Search - User list
Full Version: Moderation view error. Global name 'topic_list' is not defined
Root » Bugs » Moderation view error. Global name 'topic_list' is not defined
1
ChehoV
NameError at /moderate/<forum_id>

global name 'topic_list' is not defined

/var/django/forum/djangobb_forum/views.py in moderate

  84. return {
  85. 'categories': Category.objects.all(),
  86. 'topic_ids': topic_ids,
  87. 'exclude_forum': forum,
  88. 'TEMPLATE': 'forum/move_topic.html'
  89. }
  90. elif 'delete_topics' in request.POST:

  91. for topic_id in topic_list:

  92. topic = get_object_or_404(Topic, pk=topic_id)
  93. topic.delete()
  94. return HttpResponseRedirect(reverse('djangobb:index'))
  95. elif 'open_topics' in request.POST:
  96. for topic_id in topic_list:
  97. open_close_topic(request, topic_id)



same in 'open_topics' and 'close_topics'

plz check it n fix
slav0nic
Tnx, fixed
ChehoV
slav0nic, you are welcome!

In moderation,
if you delete all topics in forum, the forum also removed.

This is correct?

I think that there should be a different usecase. Forum should be empty.
slav0nic
hm, this is bug, but i don't really understand as this happens)
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB