-
-
Notifications
You must be signed in to change notification settings - Fork 288
[chores:bug] Separated openwisp_controller.geo from openwisp_controller.config #1224 #1315
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
base: master
Are you sure you want to change the base?
Changes from all commits
7011f10
b39485c
c1808ae
cc3d21a
aa8ff5b
9b33607
aae73a5
364ab5d
57807fd
3816541
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,23 @@ | ||||||||||||||||||||||||||||||||||||||||||
| # Generated by Django 5.2.12 on 2026-03-23 14:59 | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| from django.db import migrations | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| class Migration(migrations.Migration): | ||||||||||||||||||||||||||||||||||||||||||
| dependencies = [ | ||||||||||||||||||||||||||||||||||||||||||
| ( | ||||||||||||||||||||||||||||||||||||||||||
| "config", | ||||||||||||||||||||||||||||||||||||||||||
| "0063_organizationconfigsettings_estimated_location_enabled_and_more", | ||||||||||||||||||||||||||||||||||||||||||
| ), | ||||||||||||||||||||||||||||||||||||||||||
| # This dependency on the geo app is required to ensure that | ||||||||||||||||||||||||||||||||||||||||||
| # the data from OrganizationConfigSettings is properly migrated to GeoSettings | ||||||||||||||||||||||||||||||||||||||||||
| # before we remove the field. | ||||||||||||||||||||||||||||||||||||||||||
pandafy marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||||||||||
| ("geo", "0006_create_geo_settings_for_existing_orgs"), | ||||||||||||||||||||||||||||||||||||||||||
| ] | ||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+6
to
+16
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ❓ Verification inconclusiveScript executed: #!/bin/bash
# Check if geo migration 0006 actually migrates the estimated_location_enabled value
cat openwisp_controller/geo/migrations/0006_create_geo_settings_for_existing_orgs.pyRepository: openwisp/openwisp-controller Repository: openwisp/openwisp-controller stdout: Script executed: # Search for OrganizationGeoSettings model definition
fd -e py -path "*/geo/*" | xargs rg -l "OrganizationGeoSettings" | head -5Repository: openwisp/openwisp-controller Repository: openwisp/openwisp-controller stdout: stderr: Script executed: # Check geo migration 0005 to see what fields are created for OrganizationGeoSettings
cat openwisp_controller/geo/migrations/0005_organizationgeosettings.pyRepository: openwisp/openwisp-controller Repository: openwisp/openwisp-controller stdout: Script executed: # Check if config's OrganizationConfigSettings has estimated_location_enabled
rg "class OrganizationConfigSettings" -A 30 openwisp_controller/config/Repository: openwisp/openwisp-controller Repository: openwisp/openwisp-controller stdout: Script executed: # Check config migration 0063 to see when estimated_location_enabled was added
cat openwisp_controller/config/migrations/0063_organizationconfigsettings_estimated_location_enabled_and_more.pyRepository: openwisp/openwisp-controller Repository: openwisp/openwisp-controller stdout: Script executed: # Search for AbstractOrganizationConfigSettings to see the field definition
rg "estimated_location_enabled" openwisp_controller/config/ -B 2 -A 2Repository: openwisp/openwisp-controller Repository: openwisp/openwisp-controller stdout: Script executed: # Check the base model to understand the field
rg "class AbstractOrganizationConfigSettings" -A 50 openwisp_controller/config/Repository: openwisp/openwisp-controller Repository: openwisp/openwisp-controller stdout: Script executed: # Check the complete migration 0064 to see all operations
cat openwisp_controller/config/migrations/0064_remove_organizationconfigsettings_estimated_location_enabled_and_more.pyRepository: openwisp/openwisp-controller Repository: openwisp/openwisp-controller stdout: Script executed: # Check if geo 0006 should have data migration logic - look for similar patterns
rg "RunPython" openwisp_controller/geo/migrations/ -A 5Repository: openwisp/openwisp-controller Repository: openwisp/openwisp-controller stdout: Script executed: # Verify if there's any data migration happening elsewhere
rg "estimated_location_enabled" openwisp_controller/geo/ -B 2 -A 2Repository: openwisp/openwisp-controller Repository: openwisp/openwisp-controller stdout: Add cross-app migration dependency AND implement data migration logic in geo 0006. The removal of Add a dependency on the geo data migration to ensure proper ordering: Proposed change dependencies = [
(
"config",
"0063_organizationconfigsettings_estimated_location_enabled_and_more",
),
+ (
+ "geo",
+ "0006_create_geo_settings_for_existing_orgs",
+ ),
]Additionally, 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| operations = [ | ||||||||||||||||||||||||||||||||||||||||||
| migrations.RemoveField( | ||||||||||||||||||||||||||||||||||||||||||
| model_name="organizationconfigsettings", | ||||||||||||||||||||||||||||||||||||||||||
| name="estimated_location_enabled", | ||||||||||||||||||||||||||||||||||||||||||
| ), | ||||||||||||||||||||||||||||||||||||||||||
| ] | ||||||||||||||||||||||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.