From e6922e4c6b3637620c3cd4773470a2f7b9aeac4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=96=87=E8=89=B3?= Date: Mon, 27 Oct 2025 21:50:28 +0800 Subject: [PATCH] fix bug --- dags/office/rent/base_price.py | 2 +- dags/office/sell/base_price.py | 2 +- dags/office/sell/fill_base_price.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dags/office/rent/base_price.py b/dags/office/rent/base_price.py index 089a222..2a9d110 100644 --- a/dags/office/rent/base_price.py +++ b/dags/office/rent/base_price.py @@ -35,7 +35,7 @@ def calc(**kwargs): district = conf.get('district', None) office_name = conf.get('name', None) if year_month is None: - year_month = dateutils.format_date(dateutils.add_months(datetime.today().year, months=-1), "%Y%m") + year_month = dateutils.format_date(dateutils.add_months(datetime.today(), months=-1), "%Y%m") if pd.isna(office_name): calcByCity(city, year_month) else: diff --git a/dags/office/sell/base_price.py b/dags/office/sell/base_price.py index 5996f79..643014e 100644 --- a/dags/office/sell/base_price.py +++ b/dags/office/sell/base_price.py @@ -35,7 +35,7 @@ def calc(**kwargs): district = conf.get('district', None) office_name = conf.get('name', None) if year_month is None: - year_month = dateutils.format_date(dateutils.add_months(datetime.today().year, months=-1), "%Y%m") + year_month = dateutils.format_date(dateutils.add_months(datetime.today(), months=-1), "%Y%m") if pd.isna(office_name): calcByCity(city, year_month) diff --git a/dags/office/sell/fill_base_price.py b/dags/office/sell/fill_base_price.py index 9387102..7e80f00 100644 --- a/dags/office/sell/fill_base_price.py +++ b/dags/office/sell/fill_base_price.py @@ -22,7 +22,7 @@ def fill_base_price(**kwargs): district = conf.get('district', '') office_name = conf.get('name', '') if year_month == "": - year_month = dateutils.format_date(dateutils.add_months(datetime.today().year, months=-1), "%Y%m") + year_month = dateutils.format_date(dateutils.add_months(datetime.today(), months=-1), "%Y%m") query = {'cat': 'office'} if year_month != '':