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

[fix] Fix create_default_topology condition check #421 #422

Merged

Conversation

keviiin38
Copy link
Contributor

Fix if condition checking if the default topology should be created.

Checklist

  • I have read the OpenWISP Contributing Guidelines.
  • I have manually tested the changes proposed in this pull request.
  • I have written new test cases for new code and/or updated existing tests for changes to existing code.
  • I have updated the documentation.

Reference to Existing Issue

Closes #421

Description of Changes

Currently the if condition returns True even if the variable USE_OPENWISP_TOPOLOGY is set to False.
This is due to the fact that the value returned is "False", which evaluates to True in Python.

Screenshot

n/a

Fix if condition checking if the default topology should be created.

Fixes openwisp#421
Copy link
Member

@pandafy pandafy left a comment

Choose a reason for hiding this comment

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

Thank you for contributing @keviiin38! I have a suggest to improve this patch futher. Please see my comment below.

images/openwisp_dashboard/load_init_data.py Outdated Show resolved Hide resolved
Copy link
Member

@pandafy pandafy left a comment

Choose a reason for hiding this comment

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

LGTM!

@keviiin38
Copy link
Contributor Author

Sorry for the small fixes... I should have run the ./run-qa-checks locally before 🫤

Copy link
Member

@nemesifier nemesifier left a comment

Choose a reason for hiding this comment

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

Thanks 👍

@nemesifier nemesifier changed the title [images] Fix create_default_topology condition check #421 [fix] Fix create_default_topology condition check #421 Jan 8, 2025
@nemesifier nemesifier merged commit b0bcaed into openwisp:master Jan 8, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

[bug] USE_OPENWISP_TOPOLOGY not taken into account in load_init_data script
3 participants