From 6cb545af8b147a275e153efd070c9aafc6ad2549 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sat, 28 Jul 2018 19:14:02 -0700 Subject: [PATCH] Fix incorrect error message when deleting invalid synonym. Because P_tag was raising 404 with "no such tag" when we know it should have been "no such synonym". --- .../etiquette_flask/etiquette_flask/endpoints/tag_endpoints.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontends/etiquette_flask/etiquette_flask/endpoints/tag_endpoints.py b/frontends/etiquette_flask/etiquette_flask/endpoints/tag_endpoints.py index 164aa67..9cdf245 100644 --- a/frontends/etiquette_flask/etiquette_flask/endpoints/tag_endpoints.py +++ b/frontends/etiquette_flask/etiquette_flask/endpoints/tag_endpoints.py @@ -140,7 +140,7 @@ def post_tag_delete_synonym(): synonym = synonym.split('+')[-1].split('.')[-1] try: - master_tag = common.P_tag(synonym, response_type='json') + master_tag = common.P.get_tag(name=synonym) except etiquette.exceptions.NoSuchTag as exc: raise etiquette.exceptions.NoSuchSynonym(*exc.given_args, **exc.given_kwargs) else: