[Patchew-devel] [PATCH] maintainer: raise events for accept/reject actions

Paolo Bonzini posted 1 patch 2 months, 3 weeks ago
mods/maintainer.py | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
[Patchew-devel] [PATCH] maintainer: raise events for accept/reject actions
Posted by Paolo Bonzini 2 months, 3 weeks ago
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 mods/maintainer.py | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/mods/maintainer.py b/mods/maintainer.py
index ff4b3b0..6b12593 100644
--- a/mods/maintainer.py
+++ b/mods/maintainer.py
@@ -80,12 +80,8 @@ class MaintainerModule(PatchewModule):
             to_create, to_delete = "accept", "reject"
         else:
             to_create, to_delete = "reject", "accept"
-        QueuedSeries.objects.filter(
-            user=request.user, message=msg, name=to_delete
-        ).delete()
-        QueuedSeries.objects.get_or_create(
-            user=request.user, message=msg, name=to_create
-        )
+        self._drop_from_queue(request.user, msg, to_delete)
+        self._add_to_queue(request.user, msg, to_create)
         return HttpResponseRedirect(request.META.get("HTTP_REFERER"))
 
     def _delete_review(self, request, message_id):
-- 
2.34.1

_______________________________________________
Patchew-devel mailing list
Patchew-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/patchew-devel