from django.db import models
from django.urls import reverse

TALK_STATUS_CHOICES = (
    ('S', 'Submitted'),
    ('A', 'Approved'),
    ('R', 'Rejected'),
    ('C', 'Confirmed'),
)


class Talk(models.Model):
    speaker_name = models.CharField(max_length=1000)
    speaker_email = models.CharField(max_length=1000)
    title = models.CharField(max_length=1000)
    description = models.TextField()
    sessions_available = models.ManyToManyField(
        'Session', related_name='talks_available')
    status = models.CharField(
        max_length=1, choices=TALK_STATUS_CHOICES,
        default='S')

    def get_absolute_url(self):
        return reverse('talks-talks-id', args=[self.id])

    def __str__(self):
        return self.speaker_name


class Session(models.Model):
    date = models.DateField()
    description = models.TextField(
        blank=True, help_text='Any special theme or info about the session.')

    def __str__(self):

        return '{} - {} '.format(self.date, self.description)

    def approved_talks(self):
        sets = [
            self.talks_available.filter(status=status) for status in ('A', 'C')
        ]
        return sets[0].union(sets[1])

    def get_absolute_url(self):
        return reverse('talks-sessions-id', args=[self.id])

@@ -1048,28 +1048,14 @@
     
-sets = %5B%0A           
+return
  sel
@@ -1089,31 +1089,13 @@
 atus
-=status) for status in 
+__in=
 ('A'
@@ -1104,55 +1104,8 @@
 'C')
-%0A        %5D%0A        return sets%5B0%5D.union(sets%5B1%5D
 )%0A%0A 

Use a filter field lookup