Correct method names

This commit is contained in:
Christopher C. Wells 2021-07-31 13:16:50 -07:00
parent c873f84a2c
commit 824d2af0da
1 changed files with 2 additions and 2 deletions

View File

@ -327,7 +327,7 @@ class TimerRestart(PermissionRequired403Mixin, RedirectView):
http_method_names = ['post']
permission_required = ('core.change_timer',)
def get(self, request, *args, **kwargs):
def post(self, request, *args, **kwargs):
instance = models.Timer.objects.get(id=kwargs['pk'])
instance.restart()
messages.success(request, '{} restarted.'.format(instance))
@ -342,7 +342,7 @@ class TimerStop(PermissionRequired403Mixin, SuccessMessageMixin, RedirectView):
permission_required = ('core.change_timer',)
success_message = _('%(timer)s stopped.')
def get(self, request, *args, **kwargs):
def post(self, request, *args, **kwargs):
instance = models.Timer.objects.get(id=kwargs['pk'])
instance.stop()
messages.success(request, '{} stopped.'.format(instance))