We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent de2dba7 commit f259243Copy full SHA for f259243
src/apmodel/loader.py
@@ -1,5 +1,7 @@
1
from dataclasses import fields
2
3
+from .context import LDContext
4
+
5
from .types import ActivityPubModel
6
from .core import (
7
Object,
@@ -146,7 +148,7 @@ def load(data: dict) -> dict | ActivityPubModel:
146
148
known_fields = {f.name for f in fields(cls)}
147
149
for key, value in data.items():
150
if key == "@context":
- kwargs["_context"] = value
151
+ kwargs["_context"] = LDContext(value)
152
elif key in known_fields:
153
if isinstance(value, dict):
154
kwargs[key] = load(value)
0 commit comments