Skip to content

Commit 8f21dbb

Browse files
author
Jason Munro
authored
Fix passing session and headers in base rester (#717)
* Fix passing session and headers in base rester * Linting * More linting
1 parent ac4bb36 commit 8f21dbb

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

mp_api/client/core/client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,8 @@ def get_data_by_id(
845845
from mp_api.client.routes.materials import MaterialsRester
846846

847847
with MaterialsRester(
848-
api_key=self.api_key, endpoint=self.base_endpoint, use_document_model=False, monty_decode=False
848+
api_key=self.api_key, endpoint=self.base_endpoint, use_document_model=False, monty_decode=False,
849+
session=self.session, headers=self.headers
849850
) as mpr:
850851
docs = mpr.search(task_ids=[document_id], fields=["material_id"])
851852

0 commit comments

Comments
 (0)