build(deps): bump django from 3.1.7 to 3.2 (#707)

* build(deps): bump django from 3.1.7 to 3.2

Bumps [django](https://github.com/django/django) from 3.1.7 to 3.2.
- [Release notes](https://github.com/django/django/releases)
- [Commits](https://github.com/django/django/compare/3.1.7...3.2)

Signed-off-by: dependabot[bot] <support@github.com>

* root: set DEFAULT_AUTO_FIELD and remove full app config paths

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>

* *: check parent class for component and serializer on abstract classes

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
dependabot[bot]
2021-04-07 10:54:38 +02:00
committed by GitHub
parent c5b56fd4e6
commit 17de0ff24e
5 changed files with 57 additions and 46 deletions

View File

@ -67,12 +67,17 @@ class SourceViewSet(
data = []
for subclass in all_subclasses(self.queryset.model):
subclass: Source
component = ""
if subclass._meta.abstract:
component = subclass.__bases__[0]().component
else:
component = subclass().component
# pyright: reportGeneralTypeIssues=false
data.append(
{
"name": subclass._meta.verbose_name,
"description": subclass.__doc__,
"component": subclass().component,
"component": component,
}
)
return Response(TypeCreateSerializer(data, many=True).data)