remove coutry name iso argument as it is not needed, retype error message
This commit is contained in:
parent
4359c70883
commit
c7fe33d438
@ -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
|
||||
|
||||
|
@ -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()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user