【发布时间】:2020-03-03 20:47:52
【问题描述】:
我收到以下错误 IndentationError: 意外缩进
def send_daily(): '''每天发送的检查报告'''
current_day = calendar.day_name[now_datetime().weekday()]
enabled_reports = frappe.get_all('Auto Email Report',
filters={'enabled': 1, 'frequency': ('in', ('Daily', 'Weekdays', 'Weekly'))})
for report in enabled_reports:
auto_email_report = frappe.get_doc('Auto Email Report', report.name)
# if not correct weekday, skip
if auto_email_report.frequency == "Weekdays":
if current_day in ("Saturday", "Sunday"):
continue
elif auto_email_report.frequency == 'Weekly':
schedule.every().monday.at('10:00')
continue
我在线收到缩进错误: 如果 current_day 在(“星期六”,“星期日”): 继续 如何消除缩进错误?
【问题讨论】:
标签: python-2.7