From 8f75078152dc601eeec8ad705b284fb52a56c9cd Mon Sep 17 00:00:00 2001 From: Jean-Roman Garnier Date: Sat, 15 Feb 2020 12:30:37 +0000 Subject: [PATCH 1/3] Fix cheque cotisations being saved twice --- cotisations/payment_methods/cheque/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cotisations/payment_methods/cheque/views.py b/cotisations/payment_methods/cheque/views.py index a22e9c09..89861b9a 100644 --- a/cotisations/payment_methods/cheque/views.py +++ b/cotisations/payment_methods/cheque/views.py @@ -47,7 +47,7 @@ def cheque(request, invoice_pk): form = InvoiceForm(request.POST or None, instance=invoice) if form.is_valid(): form.instance.valid = True - form.save() + # For is saved in call to end_payment return form.instance.paiement.end_payment( form.instance, request, use_payment_method=False ) From d526759270dff84d574531b7b90d068ed0908c85 Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Fri, 27 Mar 2020 20:21:23 +0000 Subject: [PATCH 2/3] Drop support python2 in boostrap3 12 --- pip_requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pip_requirements.txt b/pip_requirements.txt index b187b42b..de34ecb9 100644 --- a/pip_requirements.txt +++ b/pip_requirements.txt @@ -1,2 +1,2 @@ -django-bootstrap3 +django-bootstrap3==11.1.0 django-macaddress From c356613a83c8d985c09f945cd8991cfb8fe9bee5 Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Sun, 29 Mar 2020 01:00:00 +0100 Subject: [PATCH 3/3] Fix tickets permissions name --- tickets/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tickets/models.py b/tickets/models.py index 3308c6db..55827097 100644 --- a/tickets/models.py +++ b/tickets/models.py @@ -74,13 +74,13 @@ class Ticket(AclMixin, models.Model): """ Check that the user has the right to view the ticket or that it is the author""" if ( - not user_request.has_perm("tickets.view_ticket") + not user_request.has_perm("tickets.view_tickets") and self.user != user_request ): return ( False, _("You don't have the right to view other tickets than yours."), - ("tickets.view_ticket",), + ("tickets.view_tickets",), ) else: return True, None, None