Don't use generic ActivityObject as serializer

This commit is contained in:
Mouse Reeve
2021-02-17 10:15:22 -08:00
parent 8bb20730fc
commit b18dac5814
2 changed files with 6 additions and 1 deletions

View File

@ -76,8 +76,12 @@ class ActivityObject:
is_subclass = False
# parse a dict into the appropriate activity
if is_subclass and isinstance(value, dict):
serializer = None
if not isinstance(field.type, ActivityObject):
# this is generic, gotta figure out the type manually
serializer = field.type
value = naive_parse(
activity_objects, value, serializer=field.type)
activity_objects, value, serializer=serializer)
except KeyError:
if field.default == MISSING and \