Skip to content

Commit

Permalink
Fix tails upload for anoncreds multitenancy
Browse files Browse the repository at this point in the history
Signed-off-by: jamshale <[email protected]>
  • Loading branch information
jamshale committed Nov 21, 2024
1 parent 3c7dee8 commit 5ec73ac
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion acapy_agent/anoncreds/revocation.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
from ..core.error import BaseError
from ..core.event_bus import Event, EventBus
from ..core.profile import Profile, ProfileSession
from ..multitenant.base import BaseMultitenantManager
from ..tails.anoncreds_tails_server import AnonCredsTailsServer
from ..tails.base import BaseTailsServer
from .error_messages import ANONCREDS_PROFILE_REQUIRED_MSG
from .events import RevListFinishedEvent, RevRegDefFinishedEvent
Expand Down Expand Up @@ -694,7 +696,12 @@ def get_local_tails_path(self, rev_reg_def: RevRegDef) -> str:

async def upload_tails_file(self, rev_reg_def: RevRegDef):
"""Upload the local tails file to the tails server."""
tails_server = self.profile.inject_or(BaseTailsServer)
multitenant_mgr = self.profile.inject_or(BaseMultitenantManager)
if multitenant_mgr:
tails_server = AnonCredsTailsServer()
else:
tails_server = self.profile.inject_or(BaseTailsServer)

if not tails_server:
raise AnonCredsRevocationError("Tails server not configured")
if not Path(self.get_local_tails_path(rev_reg_def)).is_file():
Expand Down

0 comments on commit 5ec73ac

Please sign in to comment.