График

This commit is contained in:
iriska-gri committed 2023-12-27 16:56:13 +03:00
1 parent 6ca56c6408
commit f699b4ffef
4 files changed
+66 -7

No files matched your search

+2 -2
View File
@@ -31,8 +31,8 @@ class Counter(ListAPIView):
if request.data['user__id'] is not None:
watch,create = CountVisitor.objects.get_or_create(user = User(id=request.data['user__id']),pages=page, visitdate=date.today())
else:
watch,create = CountVisitor.objects.get_or_create(user__id__isnull=True, pages=page, visitdate=date.today())
# else:
# watch,create = CountVisitor.objects.get_or_create(user__id__isnull=True, pages=page, visitdate=date.today())
watch.count+=1
watch.save()