.plugin_config() can return None

This commit is contained in:
Simon Willison 2022-04-28 13:29:11 -07:00 committed by GitHub
commit 94a3171b01
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View file

@ -182,6 +182,8 @@ When you are writing plugins, you can access plugin configuration like this usin
This will return the ``{"latitude_column": "lat", "longitude_column": "lng"}`` in the above example.
If there is no configuration for that plugin, the method will return ``None``.
If it cannot find the requested configuration at the table layer, it will fall back to the database layer and then the root layer. For example, a user may have set the plugin configuration option like so::
{