ArmindoFlores / ao3_api

An unofficial archiveofourown.org (AO3) API for python
MIT License
166 stars 64 forks source link

Works returned by `Session.get_marked_for_later` are not initialized with `session`. #66

Closed ChrisCScott closed 2 years ago

ChrisCScott commented 2 years ago

Session.get_marked_for_later returns a list of Work objects. However, when those objects are initialized, the session object is not passed (c.f. session.py line 560).

The result is that calling methods of the work which require a session (e.g. an attempt to call work.reload() on a restricted work) will fail.

I believe this can be solved simply by passing session=self when initializing each work. I'll issue a PR.