[patchew-devel] [PATCH 6/7] api: Don't append None into updated_series list

  • From: Fam Zheng <famz@xxxxxxxxxx>
  • To: patchew-devel@xxxxxxxxxxxxx
  • Date: Wed, 7 Mar 2018 16:46:08 +0800

Signed-off-by: Fam Zheng <famz@xxxxxxxxxx>
---
 api/views.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/api/views.py b/api/views.py
index 042aea0..27c8775 100644
--- a/api/views.py
+++ b/api/views.py
@@ -137,7 +137,9 @@ class UpdateProjectHeadView(APILoginRequiredView):
             ret += 1
             mo.is_merged = True
             mo.save()
-            updated_series.append(mo.get_series_head())
+            s = mo.get_series_head()
+            if s:
+                updated_series.append(s)
         for s in updated_series:
             merged = True
             for p in s.get_patches():
-- 
2.14.3


Other related posts:

  • » [patchew-devel] [PATCH 6/7] api: Don't append None into updated_series list - Fam Zheng