mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-18 04:03:22 +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):
|
def refill(self, request):
|
||||||
"""Refill the customer's account"""
|
"""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)
|
form = RefillForm(request.POST)
|
||||||
if form.is_valid():
|
if form.is_valid():
|
||||||
form.instance.counter = self.object
|
form.instance.counter = self.object
|
||||||
|
Loading…
Reference in New Issue
Block a user