From 8f21dbbb416d294e3df4f872368481537359acf2 Mon Sep 17 00:00:00 2001 From: Jason Munro Date: Thu, 8 Dec 2022 15:03:38 -0800 Subject: [PATCH] Fix passing session and headers in base rester (#717) * Fix passing session and headers in base rester * Linting * More linting --- mp_api/client/core/client.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mp_api/client/core/client.py b/mp_api/client/core/client.py index 07c6c4be..04dbbbc9 100644 --- a/mp_api/client/core/client.py +++ b/mp_api/client/core/client.py @@ -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"])