Don't always crash generating payloads if Django is installed but not configured

merge-requests/160/merge
Jason Robinson 2020-02-22 01:32:19 +02:00
rodzic fd63767263
commit bdc44ac59c
2 zmienionych plików z 7 dodań i 1 usunięć

Wyświetl plik

@ -55,6 +55,8 @@
to be deduplicated when sending public payloads to remote ActivityPub servers. Refetching
profiles should now fix this. ([related issue](https://git.feneas.org/jaywink/federation/issues/124))
* Don't always crash generating payloads if Django is installed but not configured.
## [0.19.0] - 2019-12-15
### Added

Wyświetl plik

@ -18,7 +18,11 @@ def get_configuration():
# TODO remove or default to True once AP support is more ready
"activitypub": False,
}
configuration.update(settings.FEDERATION)
try:
configuration.update(settings.FEDERATION)
except ImproperlyConfigured:
# Django is not properly configured, return defaults
return configuration
if not all([
"get_private_key_function" in configuration,
"get_profile_function" in configuration,