calpaterson / quarchive

Traditional "Web 2.0" social bookmarking, with small improvements
https://quarchive.com/
GNU Affero General Public License v3.0
99 stars 6 forks source link

Bookmarks duplicated in web views if tagged #65

Closed calpaterson closed 3 years ago

calpaterson commented 3 years ago

Description

Some bookmarks get doubled up by the number of tags multiplied by the number of discussion sources

Steps to reproduce

  1. Bookmark something
  2. Ensure that there are discussions on both reddit and hn for it
  3. Add two tags

Expected result

Bookmark shown a single time

Actual result

Shown twice

Additional details

The work around is to remove a joinedload call for BookmarkTags. This means that tags now suffer from n+1 but that is probably fine for the moment - soon this query will be rewritten at the SQLAlchemy "core" layer