Tests deactivating connectors
This commit is contained in:
parent
3c7882b055
commit
82117a7d28
2 changed files with 31 additions and 4 deletions
|
@ -37,7 +37,7 @@ class FederatedServer(BookWyrmModel):
|
|||
|
||||
# check for related connectors
|
||||
if self.application_type == "bookwyrm":
|
||||
connector_model = apps.get_model("bookwyrm.Connector", require_read=True)
|
||||
connector_model = apps.get_model("bookwyrm.Connector", require_ready=True)
|
||||
connector_model.objects.filter(
|
||||
identifier=self.server_name, active=True
|
||||
).update(active=False, deactivation_reason="domain_block")
|
||||
|
@ -53,7 +53,7 @@ class FederatedServer(BookWyrmModel):
|
|||
|
||||
# check for related connectors
|
||||
if self.application_type == "bookwyrm":
|
||||
connector_model = apps.get_model("bookwyrm.Connector", require_read=True)
|
||||
connector_model = apps.get_model("bookwyrm.Connector", require_ready=True)
|
||||
connector_model.objects.filter(
|
||||
identifier=self.server_name,
|
||||
active=False,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue