Skip to content

[wip] Avoid using .objects.get#1046

Closed
swebberuk wants to merge 3 commits intomainfrom
remove-exclusions-from-lint
Closed

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

Conversation

@swebberuk
Copy link
Copy Markdown
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
Copy Markdown

@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
@swebberuk swebberuk force-pushed the remove-exclusions-from-lint branch from 415a73a to 8c6a408 Compare April 2, 2026 09:38
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Apr 2, 2026

@swebberuk swebberuk closed this Apr 2, 2026
@swebberuk swebberuk deleted the remove-exclusions-from-lint branch April 2, 2026 11:22
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