mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-21 09:18:23 +02:00
Order participations by validity status and by trigram
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
@ -19,8 +19,7 @@ class RegistrationTable(tables.Table):
|
||||
)
|
||||
|
||||
def order_type(self, queryset, desc):
|
||||
types = ["volunteerregistration", "-volunteerregistration__admin", "participantregistration"]
|
||||
return queryset.order_by(*(("-" if desc else "") + t for t in types)), True
|
||||
return queryset.order_by(('-' if desc else '') + 'polymorphic_ctype'), True
|
||||
|
||||
class Meta:
|
||||
attrs = {
|
||||
|
Reference in New Issue
Block a user