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()