From e96750a695e1620662052b4f0c4bd3dfce8affaf Mon Sep 17 00:00:00 2001 From: Taka Date: Fri, 31 Jan 2020 04:29:33 +0000 Subject: [PATCH] Don't show duplicate warnings. --- asl_articles/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asl_articles/utils.py b/asl_articles/utils.py index 5fecb63..4961afa 100644 --- a/asl_articles/utils.py +++ b/asl_articles/utils.py @@ -59,7 +59,7 @@ def make_ok_response( extras=None, updated=None, warnings=None ): if updated: resp[ "updated" ] = updated if warnings: - resp[ "warnings" ] = warnings + resp[ "warnings" ] = list( set( warnings ) ) # nb: remove duplicate messages return jsonify( resp ) # ---------------------------------------------------------------------