Skip to content

Commit

Permalink
Merge pull request #384 from Kegbot/mikey/bugfix
Browse files Browse the repository at this point in the history
Fix: admin drink deletions not updating stats/sessions
  • Loading branch information
mik3y authored Feb 23, 2020
2 parents 683689c + e98a1b9 commit 6c0f2bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/source/release-notes/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ For a detailed look at what's new in version 1.3, see :ref:`version-13-release-n
* Skip notifications for inactive users (#349)
* Fix compatibility with with MySQL versions later than v5.7.5 (#356)
* Allow usernames with a period (#336)
* Update stats and sessions when admin deletes a drink (#371)

**Other Changes**

Expand Down
2 changes: 1 addition & 1 deletion pykeg/web/kegadmin/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ def drink_list(request):
delete_ids = request.POST.getlist("delete_ids[]")
drinks = models.Drink.objects.filter(Q(id__in=delete_ids))
for drink in drinks:
drink.delete()
request.backend.cancel_drink(drink)
delete_ids.reverse()
if len(delete_ids) == 1:
messages.success(request, 'Drink ' + delete_ids[0] + ' has been deleted.')
Expand Down

0 comments on commit 6c0f2bf

Please sign in to comment.