From ce4d14a688d858e6d94ee8515157dec9e9f32d3d Mon Sep 17 00:00:00 2001 From: tobi Date: Wed, 8 Jan 2025 21:24:35 +0100 Subject: [PATCH] wee --- internal/processing/admin/domainpermissionsubscription.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/internal/processing/admin/domainpermissionsubscription.go b/internal/processing/admin/domainpermissionsubscription.go index 6c051222c..bdc38df63 100644 --- a/internal/processing/admin/domainpermissionsubscription.go +++ b/internal/processing/admin/domainpermissionsubscription.go @@ -272,6 +272,12 @@ func (p *Processor) DomainPermissionSubscriptionRemove( return nil, gtserror.NewErrorNotFound(err, err.Error()) } + // Convert to API perm sub *before* doing the deletion. + apiPermSub, errWithCode := p.apiDomainPermSub(ctx, permSub) + if errWithCode != nil { + return nil, errWithCode + } + // TODO in next PR: if removeChildren, then remove all // domain permissions that are children of this domain // permission subscription. If not removeChildren, then @@ -282,7 +288,7 @@ func (p *Processor) DomainPermissionSubscriptionRemove( return nil, gtserror.NewErrorInternalError(err) } - return p.apiDomainPermSub(ctx, permSub) + return apiPermSub, nil } func (p *Processor) DomainPermissionSubscriptionTest(