From 778b7f63dd7d252ae9168dc1f3e37c2b8925746d Mon Sep 17 00:00:00 2001 From: erjemin Date: Thu, 30 Apr 2026 23:42:43 +0300 Subject: [PATCH] =?UTF-8?q?mod:=20=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D1=80=D0=BE=D1=83=D1=82=D0=B8=D0=BD=D0=B3?= =?UTF-8?q?=D0=B0=20=D0=B4=D0=BB=D1=8F=20=D1=81=D1=82=D1=80=D0=B0=D0=BD?= =?UTF-8?q?=D0=B8=D1=86=D1=8B=20=D1=86=D0=B5=D0=BD=D0=BE=D0=B2=D1=8B=D1=85?= =?UTF-8?q?=20=D0=BF=D1=80=D0=B5=D0=B4=D0=BB=D0=BE=D0=B6=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B9=20(2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- oknardia/web/prices.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/oknardia/web/prices.py b/oknardia/web/prices.py index dc9ea03..2ab9c1d 100644 --- a/oknardia/web/prices.py +++ b/oknardia/web/prices.py @@ -937,18 +937,21 @@ def report_price(request: HttpRequest, build_id: str = "22427", apart_id: str = # print("id_last_visit_log:", id_last_visit_log) if id_last_visit_log > MAX_LEN_RING_LOG_BUFFER: # максимальный размер циклического буфера id_last_visit_log = 1 # ставим в начало буфера + + new_url = f"/price/seriaID{to_template['BASE_SERIA_ID']}--{to_template['BASE_SERIA_LAT']}/appartID{apart_id}/addressID{build_id}--null" + try: log_entry = LogVisitPriceReport.objects.get(id=id_last_visit_log) log_entry.sLogAddress = to_template["ADDRESS"] log_entry.sLogNameApartment = to_template["APART"] - log_entry.sLogURL = f"/{build_id}/{apart_id}/{to_template['ADDRESS_T']}" + log_entry.sLogURL = new_url log_entry.dLogVisitTime = time.perf_counter() log_entry.save() # UPDATE except ObjectDoesNotExist: log_entry = LogVisitPriceReport( sLogAddress=to_template["ADDRESS"], sLogNameApartment=to_template["APART"], - sLogURL=f"/{build_id}/{apart_id}/{to_template['ADDRESS_T']}", + sLogURL=new_url, dLogVisitTime=time.perf_counter() ) log_entry.save() # INSERT @@ -959,7 +962,7 @@ def report_price(request: HttpRequest, build_id: str = "22427", apart_id: str = last_visit_for_context = list(last_visit) # подготавливаем данные о текущем посещении для помещения в cookie Item = { - "LastURL": f"/{build_id}/{apart_id}/{to_template['ADDRESS_T']}", + "LastURL": new_url, "LastAddress": to_template["ADDRESS"], "LastApart": to_template["APART"], "Time": time.perf_counter()}