Skip to content
This repository has been archived by the owner on Feb 8, 2019. It is now read-only.

Commit

Permalink
[bug 1135634] Deactivate question taken by someone else
Browse files Browse the repository at this point in the history
  • Loading branch information
rehandalal committed Feb 24, 2015
1 parent cd61fb7 commit 8bdbe2b
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions app/js/question_controller.js
Expand Up @@ -261,18 +261,8 @@
}

function check_if_taken([question, answers]) {
return User.get_user().then(function(user) {
if (!question.taken_by || question.taken_by.username == user.username) {
return [question, answers];
}

var dialog = document.getElementById('already_taken');
dialog.classList.remove('hide');
dialog.addEventListener('submit', function(evt) {
history.back();
});
throw new Error('Already taken');
});
// TODO bug 1136077
return [question, answers];
}

function display_question([question, answers]) {
Expand Down

0 comments on commit 8bdbe2b

Please sign in to comment.