From 4b20d89ebe52bed8bfc1890a109e6c18c2b917d7 Mon Sep 17 00:00:00 2001 From: Josh Humphries Date: Mon, 13 Dec 2021 17:06:51 +0000 Subject: [PATCH] Fix code after orjson removal --- iiif/profiles/mss.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/iiif/profiles/mss.py b/iiif/profiles/mss.py index b9c0bc6..fe72989 100644 --- a/iiif/profiles/mss.py +++ b/iiif/profiles/mss.py @@ -6,7 +6,7 @@ import aiocron as aiocron import aiohttp -import orjson +import json import shutil import tempfile import time @@ -264,7 +264,7 @@ async def get_doc() -> Optional[dict]: doc_url = f'{next(self.es_hosts)}/{self.mss_index}/_doc/{name}' async with self.es_session.get(doc_url) as response: text = await response.text(encoding='utf-8') - info = orjson.loads(text) + info = json.loads(text) if not info['found']: return None @@ -275,7 +275,7 @@ async def get_doc() -> Optional[dict]: .filter('term', **{'meta.versions': int(time.time() * 1000)}) async with self.es_session.post(count_url, json=search.to_dict()) as response: text = await response.text(encoding='utf-8') - if orjson.loads(text)['count'] == 0: + if json.loads(text)['count'] == 0: return None # finally, check with mss that the irn is valid