TabbycatDebate/tabbycat

View on GitHub
tabbycat/adjallocation/preformed/direct.py

Summary

Maintainability
A
0 mins
Test Coverage
B
83%
from .base import BasePreformedPanelAllocator, register


@register
class DirectPreformedPanelAllocator(BasePreformedPanelAllocator):
    """Allocates panels to debates in the same order as their room ranks."""

    key = "direct"

    def allocate(self):
        return self.debates.order_by('room_rank'), self.panels.order_by('room_rank')