Compare commits
1 commit
master
...
old-wallet
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4efb4ab664 |
1 changed files with 2 additions and 2 deletions
|
|
@ -354,7 +354,7 @@ class CategoryDepositVerifyAPIView(generics.RetrieveAPIView):
|
||||||
category = get_object_or_404(Category.objects.all(), uuid=category_uuid)
|
category = get_object_or_404(Category.objects.all(), uuid=category_uuid)
|
||||||
else:
|
else:
|
||||||
category = None
|
category = None
|
||||||
wallet = Wallet.objects.get(owner_uuid=application.uuid, owner_type=TypeChoices.APPLICATION, category=category)
|
wallet, created = Wallet.objects.get_or_create(owner_uuid=application.uuid, owner_type=TypeChoices.APPLICATION, category=category)
|
||||||
return Transaction.objects.filter(application=application, payer_wallet=wallet).all()
|
return Transaction.objects.filter(application=application, payer_wallet=wallet).all()
|
||||||
|
|
||||||
def retrieve(self, request, *args, **kwargs):
|
def retrieve(self, request, *args, **kwargs):
|
||||||
|
|
@ -464,7 +464,7 @@ class CategoryWithdrawVerifyAPIView(generics.RetrieveAPIView):
|
||||||
category = get_object_or_404(Category.objects.all(), uuid=category_uuid)
|
category = get_object_or_404(Category.objects.all(), uuid=category_uuid)
|
||||||
else:
|
else:
|
||||||
category = None
|
category = None
|
||||||
wallet = Wallet.objects.get(owner_uuid=application.uuid, owner_type=TypeChoices.APPLICATION, category=category)
|
wallet, created = Wallet.objects.get_or_create(owner_uuid=application.uuid, owner_type=TypeChoices.APPLICATION, category=category)
|
||||||
return Transaction.objects.filter(application=application, payee_wallet=wallet).all()
|
return Transaction.objects.filter(application=application, payee_wallet=wallet).all()
|
||||||
|
|
||||||
def retrieve(self, request, *args, **kwargs):
|
def retrieve(self, request, *args, **kwargs):
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue