core: fix propertymapping API returning invalid value for components

closes #746

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-04-17 11:50:28 +02:00
parent ce98255607
commit de74f3ec1f
1 changed files with 2 additions and 1 deletions

View File

@ -91,7 +91,8 @@ class PropertyMappingViewSet(
{ {
"name": subclass._meta.verbose_name, "name": subclass._meta.verbose_name,
"description": subclass.__doc__, "description": subclass.__doc__,
"component": subclass.component, # pyright: reportGeneralTypeIssues=false
"component": subclass().component,
} }
) )
return Response(TypeCreateSerializer(data, many=True).data) return Response(TypeCreateSerializer(data, many=True).data)