From aeba38b8ae4691dac841f40a64ad5eee562023eb Mon Sep 17 00:00:00 2001 From: Humberto Rocha Date: Sun, 29 Jan 2023 14:26:08 -0500 Subject: [PATCH] Enable post search to other supported post types (#481) * Enable post search to other supported post types like question, video, and others * Upgrade isort to match pre-commit config --- activities/services/search.py | 2 +- requirements-dev.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/activities/services/search.py b/activities/services/search.py index 9981363..e9a6920 100644 --- a/activities/services/search.py +++ b/activities/services/search.py @@ -94,7 +94,7 @@ class SearchService: return identity # Is it a post? - elif type == "note": + elif type in [value.lower() for value in Post.Types.values]: # Try and retrieve the post by URI # (we do not trust the JSON we just got - fetch from source!) try: diff --git a/requirements-dev.txt b/requirements-dev.txt index c0dbdc3..05e812d 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,7 +1,7 @@ -r requirements.txt black==22.10.0 flake8==5.0.4 -isort==5.10.1 +isort==5.12.0 mock~=4.0.3 pre-commit~=2.20.0 pytest-asyncio~=0.20.2