fix logging and exception

This commit is contained in:
2025-09-10 12:32:36 +02:00
parent f6e8758541
commit f5c04f9d58
2 changed files with 6 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
from django.shortcuts import render
from django.shortcuts import render, redirect
from lettings.models import Letting
import logging
@@ -31,6 +31,6 @@ def letting(request, letting_id):
}
print("that")
return render(request, 'lettings/letting.html', context)
except:
except ValueError:
logger.error(f"letting id : {letting_id} not found")
index(request)
return redirect('lettings_index')