From d306900c3179d538997134e3c22e2f953b73517c 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] 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 2e058879..0bb90fd0 100644 --- a/taiga/projects/history/mixins.py +++ b/taiga/projects/history/mixins.py @@ -59,7 +59,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()