Order by preferred and id fields for cards in settings page
This commit is contained in:
parent
cac00d4b9e
commit
2a8f02a197
1 changed files with 1 additions and 1 deletions
|
@ -226,7 +226,7 @@ class UserCardDetail(AssignPermissionsMixin, models.Model):
|
||||||
return cards_list
|
return cards_list
|
||||||
user_card_details = UserCardDetail.objects.filter(
|
user_card_details = UserCardDetail.objects.filter(
|
||||||
stripe_customer_id=stripe_customer.id
|
stripe_customer_id=stripe_customer.id
|
||||||
)
|
).order_by('-preferred', 'id')
|
||||||
for card in user_card_details:
|
for card in user_card_details:
|
||||||
cards_list.append({
|
cards_list.append({
|
||||||
'last4': card.last4, 'brand': card.brand, 'id': card.id,
|
'last4': card.last4, 'brand': card.brand, 'id': card.id,
|
||||||
|
|
Loading…
Reference in a new issue