@@ -689,7 +689,7 @@ def test_refund_backoffice_view(self):
689689
690690 # Now to refunding a bundle
691691 form_data = self ._get_form_data (
692- refund_ticket_groups = [self .opr4 .ticketgroups .order_by ("created" ). first ( )],
692+ refund_ticket_groups = [self .opr4 .ticketgroups .latest ("created" )],
693693 )
694694 response = self .client .post (url , form_data )
695695
@@ -714,7 +714,7 @@ def _get_form_data(
714714 form_data [f"ticket-{ opr .id } -INITIAL_FORMS" ] = "1"
715715 form_data [f"ticket-{ opr .id } -MIN_NUM_FORMS" ] = "0"
716716 form_data [f"ticket-{ opr .id } -MAX_NUM_FORMS" ] = "1000"
717- for index , ticket in enumerate (opr .shoptickets .order_by ("-created" ). all () ):
717+ for index , ticket in enumerate (opr .shoptickets .order_by ("-created" )):
718718 form_data [f"ticket-{ opr .id } -{ index } -uuid" ] = str (ticket .uuid )
719719 if ticket in refund_tickets :
720720 form_data [f"ticket-{ opr .id } -{ index } -refund" ] = "on"
@@ -724,7 +724,7 @@ def _get_form_data(
724724 form_data [f"ticket-group-{ opr .id } -INITIAL_FORMS" ] = "1"
725725 form_data [f"ticket-group-{ opr .id } -MIN_NUM_FORMS" ] = "0"
726726 form_data [f"ticket-group-{ opr .id } -MAX_NUM_FORMS" ] = "1000"
727- for index , ticket_group in enumerate (opr .ticketgroups .order_by ("-created" ). all () ):
727+ for index , ticket_group in enumerate (opr .ticketgroups .order_by ("-created" )):
728728 form_data [f"ticket-group-{ opr .id } -{ index } -uuid" ] = str (
729729 ticket_group .uuid ,
730730 )
0 commit comments