[Patchew-devel] [PATCH] Fix: Model Message

Shubham Jain posted 1 patch 5 years, 9 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/patchew-ci tags/patchew/20180629071757.84632-1-shubhamjain7495@gmail.com
api/models.py | 1 +
1 file changed, 1 insertion(+)
[Patchew-devel] [PATCH] Fix: Model Message
Posted by Shubham Jain 5 years, 9 months ago
While importing messages to the projects, the series wasn't updating like in the add_message_from_mbox(). Added in the create to support the REST api.
---
 api/models.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/api/models.py b/api/models.py
index b4f8468..2068ffd 100644
--- a/api/models.py
+++ b/api/models.py
@@ -294,6 +294,7 @@ class MessageManager(models.Manager):
         msg.save_mbox(mbox)
         msg.save()
         emit_event("MessageAdded", message=msg)
+        self.update_series(msg)
         return msg
 
     def add_message_from_mbox(self, mbox, user, project_name=None):
-- 
2.15.1 (Apple Git-101)

_______________________________________________
Patchew-devel mailing list
Patchew-devel@redhat.com
https://www.redhat.com/mailman/listinfo/patchew-devel
Re: [Patchew-devel] [PATCH] Fix: Model Message
Posted by Fam Zheng 5 years, 9 months ago
On Fri, 06/29 12:47, Shubham Jain wrote:
> While importing messages to the projects, the series wasn't updating like in the add_message_from_mbox(). Added in the create to support the REST api.
> ---
>  api/models.py | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/api/models.py b/api/models.py
> index b4f8468..2068ffd 100644
> --- a/api/models.py
> +++ b/api/models.py
> @@ -294,6 +294,7 @@ class MessageManager(models.Manager):
>          msg.save_mbox(mbox)
>          msg.save()
>          emit_event("MessageAdded", message=msg)
> +        self.update_series(msg)
>          return msg
>  
>      def add_message_from_mbox(self, mbox, user, project_name=None):
> -- 
> 2.15.1 (Apple Git-101)
> 
> _______________________________________________
> Patchew-devel mailing list
> Patchew-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/patchew-devel

Reviewed-by: Fam Zheng <famz@redhat.com>

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