Skip to content

[wip] Avoid using .objects.get#1046

Draft
swebberuk wants to merge 1 commit intomainfrom
remove-exclusions-from-lint
Draft

[wip] Avoid using .objects.get#1046
swebberuk wants to merge 1 commit intomainfrom
remove-exclusions-from-lint

Conversation

@swebberuk
Copy link
Contributor

@swebberuk swebberuk commented Feb 19, 2026

Remove models from ALLOWLISTED_MODELS in lint_model_usage_in_views.py.

As mentioned in comment of #1016 - We shouldn't be adding to ALLOWLISTED_MODELS, the linter is there to avoid us unintentionally exposing data from other providers.

Instead of Model.objects.get you can access them via the Appointment instance, and this will ensure that access is scoped to the user's allowed providers (as the appointment is already provider scoped).

Jira link

Review notes

Review checklist

  • Check database queries are correctly scoped to current_provider

@swebberuk swebberuk force-pushed the remove-exclusions-from-lint branch 4 times, most recently from 87e0b7e to b30d6ae Compare February 19, 2026 17:15
@swebberuk swebberuk changed the title Avoid using .objects.get [wip] Avoid using .objects.get Feb 19, 2026
@swebberuk swebberuk force-pushed the remove-exclusions-from-lint branch from 0318b02 to 415a73a Compare February 24, 2026 09:02
@sonarqubecloud
Copy link

@swebberuk swebberuk changed the title [wip] Avoid using .objects.get Avoid using .objects.get Feb 24, 2026
@swebberuk swebberuk changed the title Avoid using .objects.get [wip] Avoid using .objects.get Feb 24, 2026
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.

1 participant