diff --git a/authentik/outposts/api/service_connections.py b/authentik/outposts/api/service_connections.py index 566ed7dd6..5e722aae3 100644 --- a/authentik/outposts/api/service_connections.py +++ b/authentik/outposts/api/service_connections.py @@ -33,6 +33,13 @@ class ServiceConnectionSerializer(ModelSerializer, MetaNameSerializer): component = ReadOnlyField() + def get_component(self, obj: OutpostServiceConnection) -> str: + """Get object type so that we know how to edit the object""" + # pyright: reportGeneralTypeIssues=false + if obj.__class__ == OutpostServiceConnection: + return "" + return obj.component + class Meta: model = OutpostServiceConnection diff --git a/authentik/outposts/models.py b/authentik/outposts/models.py index af99e7b5c..3ce9659c1 100644 --- a/authentik/outposts/models.py +++ b/authentik/outposts/models.py @@ -143,7 +143,7 @@ class OutpostServiceConnection(models.Model): @property def component(self) -> str: """Return component used to edit this object""" - return "" + raise NotImplementedError class Meta: