mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 21:43:21 +00:00
report: Use DEVELOPMENT instead of DEBUG setting.
This fixes a weird issue where the following sequences of tests would fail: test-backend zerver.tests.test_messages.PersonalMessagesTest.test_personal_to_self zerver.tests.test_report.TestReport.test_report_error zerver.tests.test_templates.TemplateTestCase.test_custom_tos_template It appears that all 3 tests are required for the failure. While it's not entirely clear what the cause is, a very likely factor is that settings.DEBUG is special, and so changing it at runtime is likely to cause weird problems like this. We fix this by replacing it with settings.DEVELOPMENT, which has the same value in all environments, but doesn't have this problem of being a special Django thing.
This commit is contained in:
@@ -24,7 +24,7 @@ js_source_map = None
|
||||
def get_js_source_map():
|
||||
# type: () -> Optional[SourceMap]
|
||||
global js_source_map
|
||||
if not js_source_map and not (settings.DEBUG or settings.TEST_SUITE):
|
||||
if not js_source_map and not (settings.DEVELOPMENT or settings.TEST_SUITE):
|
||||
js_source_map = SourceMap(os.path.join(
|
||||
settings.DEPLOY_ROOT, 'prod-static/source-map'))
|
||||
return js_source_map
|
||||
|
||||
Reference in New Issue
Block a user