mirror of
https://github.com/ae-utbm/sith.git
synced 2024-12-23 00:01:16 +00:00
Post request management
This commit is contained in:
parent
bbf362691b
commit
ee3e375dde
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user