diff options
author | Filipp Lepalaan <filipp@mac.com> | 2021-05-24 12:58:19 +0300 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2021-05-24 12:58:19 +0300 |
commit | 9d8488a0fb4c6834223e8daa3dc384665b97f982 (patch) | |
tree | c35602f52fb1633a0a12c997ffc679f201c8aa5a | |
parent | 1839bb4d129a5d484e3b32f07c7b50d6143f0dd4 (diff) | |
download | Servo-9d8488a0fb4c6834223e8daa3dc384665b97f982.tar.gz Servo-9d8488a0fb4c6834223e8daa3dc384665b97f982.tar.bz2 Servo-9d8488a0fb4c6834223e8daa3dc384665b97f982.zip |
Fix saving user
-rw-r--r-- | servo/views/admin.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/servo/views/admin.py b/servo/views/admin.py index 9924f2b..5d1da4a 100644 --- a/servo/views/admin.py +++ b/servo/views/admin.py @@ -613,10 +613,9 @@ def edit_queue(request, pk=None): if form.is_valid(): try: queue = form.save() - queue.user_set = form.cleaned_data['users'] - queue.save() + queue.user_set.set(form.cleaned_data['users']) except Exception as e: - messages.error(request, _('Failed to save queue')) + messages.error(request, _('Failed to save queue (%s)' % e)) return render(request, 'admin/queues/form.html', locals()) formset = StatusFormSet(request.POST, instance=queue) |