Fix hashtag search results (#576)
We mistakenly wrote to the key "hashtag" instead of "hashtags", resulting in no results in the API response. Additionally, the type of the Tag's `history` needs to be a list, not a dict. This fixes hashtag search in Elk.
This commit is contained in:
parent
9775fa8991
commit
b3b58df2b1
|
@ -275,7 +275,7 @@ class Notification(Schema):
|
||||||
class Tag(Schema):
|
class Tag(Schema):
|
||||||
name: str
|
name: str
|
||||||
url: str
|
url: str
|
||||||
history: dict
|
history: list
|
||||||
following: bool | None
|
following: bool | None
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|
|
@ -39,7 +39,7 @@ def search(
|
||||||
for i in search_result["identities"]
|
for i in search_result["identities"]
|
||||||
]
|
]
|
||||||
if type is None or type == "hashtag":
|
if type is None or type == "hashtag":
|
||||||
result["hashtag"] = [
|
result["hashtags"] = [
|
||||||
schemas.Tag.from_hashtag(h) for h in search_result["hashtags"]
|
schemas.Tag.from_hashtag(h) for h in search_result["hashtags"]
|
||||||
]
|
]
|
||||||
if type is None or type == "statuses":
|
if type is None or type == "statuses":
|
||||||
|
|
Loading…
Reference in New Issue