fix broken things

This commit is contained in:
moritz münch 2021-10-04 13:18:55 +02:00
parent 31219c96ab
commit 4359c70883
3 changed files with 3 additions and 3 deletions

View File

@ -28,7 +28,7 @@ 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_index(name_iso): def set_last_modified_coin(name_iso):
''' 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

View File

@ -32,6 +32,6 @@ urlpatterns = [
re_path(r'^add/coin/(?P<country>[a-z]{2})/(?P<year>(?:1999|20[0-8][0-9]|209[0-8]))/(?P<value>(?:1|2|5|10|20|50|100|200|201|202|203))$', re_path(r'^add/coin/(?P<country>[a-z]{2})/(?P<year>(?:1999|20[0-8][0-9]|209[0-8]))/(?P<value>(?:1|2|5|10|20|50|100|200|201|202|203))$',
views.add_coin, name='add_coin'), views.add_coin, name='add_coin'),
path('edit/coin/<str:country>/<int:year>/<int:value>', path('edit/coin/<str:country>/<int:year>/<int:value>',
views.edit_coin, name='edit_coin') views.edit_coin, name='edit_coin'),
path('accounts/', include('django.contrib.auth.urls')), path('accounts/', include('django.contrib.auth.urls')),
] ]

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_index(country.name_iso) set_last_modified_coin(country.name_iso)
set_last_modified_country(country.name_iso) set_last_modified_country(country.name_iso)
return response() return response()