ansible / django-ansible-base

Apache License 2.0
12 stars 43 forks source link

fix: Settings logic rebind installed_apps when adding new items. #552

Closed rochacbruno closed 1 month ago

rochacbruno commented 1 month ago

The method get_dab_settings got installed_apps=[]

then did dab_data["INSTALLED_APPS"].append("ansible.rbac")

And finally when doing if "ansible.rbac" in installed_apps it was not, because the new app was added only to the dict but not to the local variable used by the conditionals.

dab_data["INSTALLED_APPS"].append("ansible.rbac")
installed_apps = dab_data["INSTALLED_APPS"]

For now, issue is fixed by shadowing local variable.

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
75.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud