django-mpesa icon indicating copy to clipboard operation
django-mpesa copied to clipboard

LipaNaMpesaOnline.py uses models.filter() to get a single instance of PaymentTransaction

Open Ekirapapaul opened this issue 4 years ago • 1 comments

Potential errors where a single instance is not found or multiple object instances are found.

Proposed solution

Use models.get(pk=id) to get a single model instance

Ekirapapaul avatar May 11 '21 18:05 Ekirapapaul

What about using models.filter.first()?

urandu avatar May 12 '21 19:05 urandu