Remove redundant query on post pages

Previously, we'd call GetCollectionAttribute for the monetization
attribute, when it's already in the collection data.
This commit is contained in:
Matt Baer 2023-09-22 11:58:11 -04:00
parent aa72bcba50
commit efe669b874
1 changed files with 1 additions and 1 deletions

View File

@ -1547,7 +1547,7 @@ Are you sure it was ever here?`,
tp.CanInvite = canUserInvite(app.cfg, tp.IsAdmin)
tp.PinnedPosts, _ = app.db.GetPinnedPosts(coll, p.IsOwner)
tp.IsPinned = len(*tp.PinnedPosts) > 0 && PostsContains(tp.PinnedPosts, p)
tp.Monetization = app.db.GetCollectionAttribute(coll.ID, "monetization_pointer")
tp.Monetization = coll.Monetization
tp.Verification = coll.Verification
if !postFound {