Skip to content

Commit

Permalink
Fetch the active organization from the write instance (#5153)
Browse files Browse the repository at this point in the history
Co-authored-by: Simon Dumas <[email protected]>
  • Loading branch information
imsdu and Simon Dumas authored Sep 24, 2024
1 parent 7b8e5d9 commit 933df3a
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 933df3a

Please sign in to comment.