Commit e44949c970e1b822677ad1b86564a373f44c705d
1 parent
3f6afdc3
Exists in
master
and in
5 other branches
Fixing subject subscribe button show [Issue: #215]
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
courses/templatetags/custom_filters.py
... | ... | @@ -8,7 +8,7 @@ def show_subject_subscribe(user, subject): |
8 | 8 | if not user is None: |
9 | 9 | if user.is_authenticated: |
10 | 10 | if has_role(user, 'student') and not user.is_staff: |
11 | - if not user in subject.students.all() and subject.show_subscribe: | |
11 | + if not user in subject.students.all() and user in subject.course.students.all() and subject.show_subscribe: | |
12 | 12 | return True |
13 | 13 | |
14 | 14 | return False | ... | ... |