From 9bdf1e07f1ce1124b6edadedb05c2729c5876285 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Espino?= Date: Tue, 14 Feb 2017 21:00:21 +0100 Subject: [PATCH] [Backport] Avoid problems with some malformed requests --- taiga/projects/history/mixins.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/taiga/projects/history/mixins.py b/taiga/projects/history/mixins.py index 14a0f44d..c8f67305 100644 --- a/taiga/projects/history/mixins.py +++ b/taiga/projects/history/mixins.py @@ -56,7 +56,9 @@ class HistoryResourceMixin(object): """ user = self.request.user - comment = self.request.DATA.get("comment", "") + comment = "" + if isinstance(self.request.DATA, dict): + comment = self.request.DATA.get("comment", "") if obj is None: obj = self.get_object()