Verified Commit ee3e375d authored by Alexandre | L'Sacienne's avatar Alexandre | L'Sacienne
Browse files

Post request management

parent bbf36269
Pipeline #2497 failed with stage
in 25 minutes and 36 seconds
......@@ -725,7 +725,7 @@ class CounterClick(CounterTabsMixin, CanViewMixin, DetailView):
def refill(self, request):
"""Refill the customer's account"""
if self.get_object().type == "BAR":
if self.get_object().type == "BAR" and self.object.can_refill():
form = RefillForm(request.POST)
if form.is_valid():
form.instance.counter = self.object
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment