Skip to content

Remove thingdb as source for patron preferences#11933

Merged
mekarpeles merged 1 commit intomasterfrom
update-preference-accessor
Feb 25, 2026
Merged

Remove thingdb as source for patron preferences#11933
mekarpeles merged 1 commit intomasterfrom
update-preference-accessor

Conversation

@jimchamp
Copy link
Collaborator

Advances #11009

Prevents patron preferences accessor from querying the thing tables for preference objects.

Untested.

Technical

Testing

Screenshot

Stakeholders

Copilot AI review requested due to automatic review settings February 25, 2026 21:06
@jimchamp jimchamp changed the title Remove 1thingdb` as source for patron preferences Remove thingdb as source for patron preferences Feb 25, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the User.preferences() accessor in openlibrary/core/models.py to stop reading patron preferences from the Infobase/ThingDB “thing” tables, and instead only read from the site.store tables (falling back to defaults if missing).

Changes:

  • Removed the ThingDB fallback lookup for /people/<user>/preferences.
  • User.preferences() now returns site.store.get(key) or get_default_preferences().

@mekarpeles mekarpeles self-assigned this Feb 25, 2026
@mekarpeles mekarpeles merged commit c66e015 into master Feb 25, 2026
12 checks passed
@mekarpeles mekarpeles deleted the update-preference-accessor branch February 25, 2026 21:50
bhardwajparth51 pushed a commit to bhardwajparth51/openlibrary that referenced this pull request Mar 3, 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.

3 participants