Commit a52ac4f6685ff27c0607c8c865633c7f37b2011a

Authored by Jailson Dias
1 parent 781db60e

restringindo para aparecer apenas os alunos do subject no select de criar uma poll #408

Showing 1 changed file with 2 additions and 0 deletions   Show diff stats
poll/views.py
... ... @@ -143,6 +143,8 @@ class CreatePoll(LoginRequiredMixin,HasRoleMixin, LogMixin, NotificationMixin,ge
143 143 def get_context_data(self, **kwargs):
144 144 context = super(CreatePoll, self).get_context_data(**kwargs)
145 145 topic = get_object_or_404(Topic, slug = self.kwargs.get('slug'))
  146 +
  147 + context.get('form').fields.get('students').queryset = topic.subject.students.all()
146 148 context["topic"] = topic
147 149 context['course'] = topic.subject.course
148 150 context['subject'] = topic.subject
... ...