web/admin/user: fix user source connection lookups
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
ec8dee3588
commit
fc6f242f86
|
@ -23,7 +23,7 @@ class UserOAuthSourceConnectionViewSet(ModelViewSet):
|
||||||
|
|
||||||
queryset = UserOAuthSourceConnection.objects.all()
|
queryset = UserOAuthSourceConnection.objects.all()
|
||||||
serializer_class = UserOAuthSourceConnectionSerializer
|
serializer_class = UserOAuthSourceConnectionSerializer
|
||||||
filterset_fields = ["source"]
|
filterset_fields = ["source__slug"]
|
||||||
|
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
if not self.request:
|
if not self.request:
|
||||||
|
|
|
@ -7415,7 +7415,7 @@ paths:
|
||||||
operationId: sources_oauth_user_connections_list
|
operationId: sources_oauth_user_connections_list
|
||||||
description: Source Viewset
|
description: Source Viewset
|
||||||
parameters:
|
parameters:
|
||||||
- name: source
|
- name: source__slug
|
||||||
in: query
|
in: query
|
||||||
description: ''
|
description: ''
|
||||||
required: false
|
required: false
|
||||||
|
|
|
@ -26,7 +26,7 @@ export class SourceSettingsOAuth extends BaseUserSettings {
|
||||||
|
|
||||||
renderInner(source: OAuthSource): TemplateResult {
|
renderInner(source: OAuthSource): TemplateResult {
|
||||||
return html`${until(new SourcesApi(DEFAULT_CONFIG).sourcesOauthUserConnectionsList({
|
return html`${until(new SourcesApi(DEFAULT_CONFIG).sourcesOauthUserConnectionsList({
|
||||||
source: this.objectId
|
sourceSlug: this.objectId
|
||||||
}).then((connection) => {
|
}).then((connection) => {
|
||||||
if (connection.results.length > 0) {
|
if (connection.results.length > 0) {
|
||||||
return html`<p>${gettext("Connected.")}</p>
|
return html`<p>${gettext("Connected.")}</p>
|
||||||
|
|
Reference in a new issue