ARTICLE AD BOX
Asked today
Viewed 7 times
def get_rating(self, obj): try: result = PaymentRequest.objects.filter( job_title__linked_job__service_provider_id=obj.id, rating__isnull=False ).aggregate(avg_rating=Avg("rating")) return result["avg_rating"] or 0 except Exception: return 0 explain this part
New contributor
Aleem Gul is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
Explore related questions
See similar questions with these tags.
