diff options
author | ankitjavalkar | 2019-03-04 20:21:16 +0530 |
---|---|---|
committer | ankitjavalkar | 2019-03-04 20:31:07 +0530 |
commit | c6475d2dc6c08fbaac3a0803f2b88c1aed539ff1 (patch) | |
tree | 45abe36729506a3b61d4402f77d2c9e015b3907c /yaksh | |
parent | f1dde181a6c30d32ea4f4cf3d2d29b780c4d45a5 (diff) | |
download | online_test-c6475d2dc6c08fbaac3a0803f2b88c1aed539ff1.tar.gz online_test-c6475d2dc6c08fbaac3a0803f2b88c1aed539ff1.tar.bz2 online_test-c6475d2dc6c08fbaac3a0803f2b88c1aed539ff1.zip |
Fix PEP8 issues
Diffstat (limited to 'yaksh')
-rw-r--r-- | yaksh/models.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/yaksh/models.py b/yaksh/models.py index 7a4d8d1..c4e5a50 100644 --- a/yaksh/models.py +++ b/yaksh/models.py @@ -1600,7 +1600,9 @@ class QuestionPaper(models.Model): attempts = AnswerPaper.objects.get_total_attempt(questionpaper=self, user=user, course_id=course_id) - return attempts < self.quiz.attempts_allowed or self.quiz.attempts_allowed == -1 + attempts_allowed = attempts < self.quiz.attempts_allowed + infinite_attempts = self.quiz.attempts_allowed == -1 + return attempts_allowed or infinite_attempts def can_attempt_now(self, user, course_id): if self._is_attempt_allowed(user, course_id): |