Fix frontlist failing on pin expiry.
Proximate cause of 500 error on frontpage is that `Query` has no such method `remove(...)`. Merely removing the line can't guarantee identical logic, but I'm not quite clear if explicit removal from the Query pseudo-collection is necessary, or if the final `pins` variable after `Query.all()` will be appropriately filtered. It appears to work right in practice, and the risk of expired pins persisting for one extra pageload for only one user seems relatively minor.remotes/1693045480750635534/spooky-22
parent
a6b7fed2fc
commit
ed42f14a77
|
@ -325,7 +325,6 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, ccmode="false"
|
|||
pin.stickied = None
|
||||
pin.stickied_utc = None
|
||||
g.db.add(pin)
|
||||
pins.remove(pin)
|
||||
|
||||
|
||||
if v: pins = pins.filter(Submission.author_id.notin_(v.userblocks))
|
||||
|
|
Loading…
Reference in New Issue