From c7fe33d43836841ccc9ea2a9873cd6f55e1cc8e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20M=C3=BCnch?= Date: Mon, 4 Oct 2021 11:32:06 +0000 Subject: [PATCH] remove coutry name iso argument as it is not needed, retype error message --- coinmanager/coinc/cache.py | 4 ++-- coinmanager/coinc/views.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/coinmanager/coinc/cache.py b/coinmanager/coinc/cache.py index 5385ac7..503a829 100644 --- a/coinmanager/coinc/cache.py +++ b/coinmanager/coinc/cache.py @@ -28,12 +28,12 @@ def get_last_modified_coin(request): return cache.get('last_modified_coin', set_last_modified_coin()) -def set_last_modified_coin(name_iso): +def set_last_modified_coin(): ''' set and return the datetime of the last coin added ''' try: last_modified = Coin.objects.latest('date_modified').date_modified except Coin.DoesNotExist: - raise Http404(f'Das Land "{name_iso}" existiert nicht') + raise Http404(f'Das Land existiert nicht') cache.set('last_modified_coin', last_modified) return last_modified diff --git a/coinmanager/coinc/views.py b/coinmanager/coinc/views.py index a6ecd26..bc88e2b 100644 --- a/coinmanager/coinc/views.py +++ b/coinmanager/coinc/views.py @@ -370,7 +370,7 @@ def add_coin(request, country, year, value): in_collector = ec, exists = exists) - set_last_modified_coin(country.name_iso) + set_last_modified_coin() set_last_modified_country(country.name_iso) return response()