Skip to content

Commit

Permalink
Fix passing session and headers in base rester (#717)
Browse files Browse the repository at this point in the history
* Fix passing session and headers in base rester

* Linting

* More linting
  • Loading branch information
Jason Munro authored Dec 8, 2022
1 parent ac4bb36 commit 8f21dbb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mp_api/client/core/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,8 @@ def get_data_by_id(
from mp_api.client.routes.materials import MaterialsRester

with MaterialsRester(
api_key=self.api_key, endpoint=self.base_endpoint, use_document_model=False, monty_decode=False
api_key=self.api_key, endpoint=self.base_endpoint, use_document_model=False, monty_decode=False,
session=self.session, headers=self.headers
) as mpr:
docs = mpr.search(task_ids=[document_id], fields=["material_id"])

Expand Down

0 comments on commit 8f21dbb

Please sign in to comment.