mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-19 05:58:34 +02:00
Make sure localconfig object is only created for default db.
This commit is contained in:
@@ -77,6 +77,9 @@ def log_object_removal(sender, instance, **kwargs):
|
||||
|
||||
def create_local_config(sender, **kwargs):
|
||||
"""Create local config if needed."""
|
||||
using = kwargs.get("using")
|
||||
if using != "default":
|
||||
return
|
||||
if models.LocalConfig.objects.using(kwargs["using"]).exists():
|
||||
return
|
||||
models.LocalConfig.objects.create(
|
||||
|
||||
Reference in New Issue
Block a user