fix(chart): non existent time grain no longer breaks the application (#23441)

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
This commit is contained in:
Rémy DUBOIS
2023-03-23 15:36:50 +01:00
committed by GitHub
parent b0773145d6
commit 07a632891c
2 changed files with 3 additions and 2 deletions

View File

@@ -332,11 +332,12 @@ def test_is_readonly():
def test_time_grain_denylist():
config = app.config.copy()
app.config["TIME_GRAIN_DENYLIST"] = ["PT1M"]
app.config["TIME_GRAIN_DENYLIST"] = ["PT1M", "SQLITE_NONEXISTENT_GRAIN"]
with app.app_context():
time_grain_functions = SqliteEngineSpec.get_time_grain_expressions()
assert not "PT1M" in time_grain_functions
assert not "SQLITE_NONEXISTENT_GRAIN" in time_grain_functions
app.config = config