aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2023-01-12 18:21:55 +0100
committerDaniel Schadt <kingdread@gmx.de>2023-01-12 18:21:55 +0100
commit7c4b47624e9a1e60f9da89ffcd93b6f35af75d79 (patch)
treef01c0574860a5fe1739d0137f80c3d4db7635530
parentdd033571082be3addd3a2fa305fed69d9bb2475d (diff)
downloadfietsboek-7c4b47624e9a1e60f9da89ffcd93b6f35af75d79.tar.gz
fietsboek-7c4b47624e9a1e60f9da89ffcd93b6f35af75d79.tar.bz2
fietsboek-7c4b47624e9a1e60f9da89ffcd93b6f35af75d79.zip
fix layer types not being recognized
Since we aliased the field layer_type to layer, we would need to use type=... to set it. However, it is a bit confusing if we access it as TileLayerConfig.layer_type, but set it with type=..., therefore let's just turn on allow_population_by_field_name. This option lets us use layer_type=... to set the field when initializing the object.
-rw-r--r--fietsboek/config.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/fietsboek/config.py b/fietsboek/config.py
index 068382e..54faf39 100644
--- a/fietsboek/config.py
+++ b/fietsboek/config.py
@@ -105,7 +105,7 @@ class PyramidList(list):
return settings.aslist(value)
-class TileLayerConfig(BaseModel):
+class TileLayerConfig(BaseModel, allow_population_by_field_name=True):
"""Object representing a single tile layer."""
layer_id: str