outposts: fix selection of outpost's service connection not showing name
This commit is contained in:
parent
e9a33ed8ab
commit
c5eff4bdd6
|
@ -8,6 +8,7 @@ from passbook.outposts.models import (
|
||||||
DockerServiceConnection,
|
DockerServiceConnection,
|
||||||
KubernetesServiceConnection,
|
KubernetesServiceConnection,
|
||||||
Outpost,
|
Outpost,
|
||||||
|
OutpostServiceConnection,
|
||||||
)
|
)
|
||||||
from passbook.providers.proxy.models import ProxyProvider
|
from passbook.providers.proxy.models import ProxyProvider
|
||||||
|
|
||||||
|
@ -18,6 +19,9 @@ class OutpostForm(forms.ModelForm):
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
super().__init__(*args, **kwargs)
|
super().__init__(*args, **kwargs)
|
||||||
self.fields["providers"].queryset = ProxyProvider.objects.all()
|
self.fields["providers"].queryset = ProxyProvider.objects.all()
|
||||||
|
self.fields[
|
||||||
|
"service_connection"
|
||||||
|
].queryset = OutpostServiceConnection.objects.select_subclasses()
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
|
|
||||||
|
|
Reference in New Issue