Fixed error where when super_user updated a Thread, it would always be maked closed and public

This commit is contained in:
Tanshu 2013-06-08 14:39:07 +05:30
parent 1fc2127835
commit 69d6a76632
2 changed files with 3 additions and 3 deletions

View File

@ -6,7 +6,7 @@
<li ng-class="{active: chosen == 'open'}"><a href ng-click="getMessages('open')">Open</a></li>
<li ng-class="{active: chosen == 'closed'}"><a href ng-click="getMessages('closed')">Closed</a></li>
<li ng-class="{active: chosen == 'all'}"><a href ng-click="getMessages('all')">All</a></li>
<li class="dropdown pull-right">
<li class="dropdown pull-right active">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Tags
<b class="caret"></b>
</a>

View File

@ -59,9 +59,9 @@ def update(request):
public = request.json_body['Public']
closed = request.json_body['Closed']
if super_user or (thread.public and not public):
thread.public = False
thread.public = public
if super_user or (not thread.closed and closed):
thread.closed = True
thread.closed = closed
thread.priority = request.json_body['Priority']
newTags = request.json_body['Tags']