Skip to content

Commit

Permalink
Fetch the active organization from the write instance
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Dumas committed Sep 24, 2024
1 parent 7b8e5d9 commit 45c1d27
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ object FetchActiveOrganization {

def apply(xas: Transactors): FetchActiveOrganization = (org: Label) =>
GlobalStateGet[Label, OrganizationState](Organizations.entityType, org)
.transact(xas.read)
.transact(xas.write)
.flatMap {
case None => IO.raiseError(OrganizationNotFound(org))
case Some(o) if o.deprecated => IO.raiseError(OrganizationIsDeprecated(org))
Expand Down

0 comments on commit 45c1d27

Please sign in to comment.