Skip to content

Commit

Permalink
Fixed according to remarks
Browse files Browse the repository at this point in the history
  • Loading branch information
grungezz committed Sep 27, 2023
1 parent 4a086d0 commit 5db58c7
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions taxi/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ def index(request):
num_cars = Car.objects.count()
num_manufacturers = Manufacturer.objects.count()

if "num_visits" not in request.session:
request.session["num_visits"] = 0
request.session["num_visits"] += 1
num_visits = request.session["num_visits"]
num_visits = request.session.setdefault("num_visits", 0)

context = {
"num_drivers": num_drivers,
Expand Down

0 comments on commit 5db58c7

Please sign in to comment.