Skip to content

Commit

Permalink
Fix code after orjson removal
Browse files Browse the repository at this point in the history
  • Loading branch information
jrdh committed Dec 13, 2021
1 parent 4ccc838 commit 4b20d89
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions iiif/profiles/mss.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import aiocron as aiocron
import aiohttp
import orjson
import json
import shutil
import tempfile
import time
Expand Down Expand Up @@ -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

Expand All @@ -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
Expand Down

0 comments on commit 4b20d89

Please sign in to comment.