remove coutry name iso argument as it is not needed, retype error message

This commit is contained in:
Moritz Münch 2021-10-04 11:32:06 +00:00
parent 4359c70883
commit c7fe33d438
2 changed files with 3 additions and 3 deletions

View File

@ -28,12 +28,12 @@ def get_last_modified_coin(request):
return cache.get('last_modified_coin', set_last_modified_coin()) 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 ''' ''' set and return the datetime of the last coin added '''
try: try:
last_modified = Coin.objects.latest('date_modified').date_modified last_modified = Coin.objects.latest('date_modified').date_modified
except Coin.DoesNotExist: 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) cache.set('last_modified_coin', last_modified)
return last_modified return last_modified

View File

@ -370,7 +370,7 @@ def add_coin(request, country, year, value):
in_collector = ec, in_collector = ec,
exists = exists) exists = exists)
set_last_modified_coin(country.name_iso) set_last_modified_coin()
set_last_modified_country(country.name_iso) set_last_modified_country(country.name_iso)
return response() return response()