Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[change] Respect disabled organizations #552 #554

Merged
merged 3 commits into from
Nov 28, 2023

Conversation

pandafy
Copy link
Member

@pandafy pandafy commented Nov 22, 2023

Closes #552

Checks:

  • I have manually tested the proposed changes
  • I have written new test cases to avoid regressions (if necessary)
  • I have updated the documentation (e.g. README.rst)

openwisp_monitoring/device/apps.py Outdated Show resolved Hide resolved
@classmethod
def organization_post_save_receiver(cls, instance, *args, **kwargs):
if instance.is_active is False:
from .tasks import organization_disabled_handler
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the import here necessary?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, because openwisp_monitoring.device.tasks imports openwisp_monitoring.checks.tasks.perform_check which in-turn imports the ContentType model globally.

openwisp_monitoring/device/base/models.py Outdated Show resolved Hide resolved
openwisp_monitoring/device/tasks.py Outdated Show resolved Hide resolved
@pandafy pandafy force-pushed the issues/552-disabled-organization branch from 5735ef8 to 1fe816f Compare November 23, 2023 18:02
@@ -155,27 +155,6 @@ def test_400(self):
)
self.assertEqual(r.status_code, 400)

def test_200_none(self):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this test being removed?

@nemesifier nemesifier merged commit 139e936 into master Nov 28, 2023
21 checks passed
@nemesifier nemesifier deleted the issues/552-disabled-organization branch November 28, 2023 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[change] Respect disabled organizations
2 participants