fix: don't enable prepared report in developer mode

This commit is contained in:
barredterra 2024-08-19 20:19:12 +02:00
parent 6c5a099c1e
commit e796e2c0f9

View file

@ -165,7 +165,7 @@ class Report(Document):
# automatically set as prepared
execution_time = (datetime.datetime.now() - start_time).total_seconds()
if execution_time > threshold and not self.prepared_report:
if execution_time > threshold and not self.prepared_report and not frappe.conf.developer_mode:
frappe.enqueue(enable_prepared_report, report=self.name)
frappe.cache.hset("report_execution_time", self.name, execution_time)