referrals

This commit is contained in:
rizwanisready
2024-04-29 19:44:44 +05:30
parent 0330ef9aae
commit c2ea198a25

View File

@@ -62,9 +62,11 @@ class RewardListView(APIView):
def get(self, request):
# Filter rewards based on specified conditions
current_principal = request.user # Adjust based on how user is linked to principal
# Filter rewards based on the authenticated referrer
rewards_query = ReferralRecordReward.objects.filter(
referral_record__active=True,
referral_record__deleted=False,
referral_record__referrer_principal=current_principal,
sell=False,
deleted=False,
active=True,