class EventManager(models.Manager):
def get_upcoming_events(self, site=None, featured_only=False): events = self.get_queryset() events = events.filter(post_status=Post.ACTIVE) if featured_only == True: events = events.filter(featured=True) if site is not None: events = events.filter(site=site) # here we are sorting events in Python, not SQL. TODO: optimise if needed. events_with_a_next_start_time = [e for e in events if e.next_start_time() is not None] events_sorted_by_next_start_time = sorted(events_with_a_next_start_time, key = lambda a: a.next_start_time()) return events_sorted_by_next_start_time
TypeError: unhashable type: 'list'
--
You received this message because you are subscribed to the Google Groups "django-watson discussion group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-watso...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-watson.
For more options, visit https://groups.google.com/d/optout.