From a551580b9f97c34bfb713b4a91174cc6cd05ac29 Mon Sep 17 00:00:00 2001 From: Brian Ndwiga Date: Thu, 2 Nov 2017 15:14:39 +0800 Subject: [PATCH] ps: update to prevent situations where users were trying to circumvent the payment process --- parkstay/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/parkstay/views.py b/parkstay/views.py index 2ad43f9132..cc884c4e3d 100644 --- a/parkstay/views.py +++ b/parkstay/views.py @@ -317,16 +317,16 @@ def get(self, request, *args, **kwargs): try: inv = Invoice.objects.get(reference=invoice_ref) except Invoice.DoesNotExist: - logger.error('User {} with id {} tried making a booking with an incorrect invoice'.format(booking.customer.get_full_name(),booking.customer.id)) + logger.error('{} tried making a booking with an incorrect invoice'.format('User {} with id {}'.format(booking.customer.get_full_name(),booking.customer.id) if booking.customer else 'An anonymous user')) return redirect('public_make_booking') if inv.system not in ['0019']: - logger.error('User {} with id {} tried making a booking with an invoice from another system with reference number {}'.format(booking.customer.get_full_name(),booking.customer.id,inv.reference)) + logger.error('{} tried making a booking with an invoice from another system with reference number {}'.format('User {} with id {}'.format(booking.customer.get_full_name(),booking.customer.id) if booking.customer else 'An anonymous user',inv.reference)) return redirect('public_make_booking') try: b = BookingInvoice.objects.get(invoice_reference=invoice_ref) - logger.error('User {} with id {} tried making a booking with an already used invoice with reference number {}'.format(booking.customer.get_full_name(),booking.customer.id,inv.reference)) + logger.error('{} tried making a booking with an already used invoice with reference number {}'.format('User {} with id {}'.format(booking.customer.get_full_name(),booking.customer.id) if booking.customer else 'An anonymous user',inv.reference)) return redirect('public_make_booking') except BookingInvoice.DoesNotExist: