Fix Ram/Organizations interop
Pagination was added to Organizations:ListOrganizationalUnitsForParent, which necessitated a change to the internal backend method call/response. NOTE: We probably want to lift the pagination decorator up to the response layer. Calls between moto backends should not be concerned with pagination at all, ideally; but this fix is the simplest solution for now.
This commit is contained in:
parent
eb3da8f91d
commit
07b7d77611
@ -87,12 +87,13 @@ class ResourceShare(BaseModel):
|
||||
)
|
||||
|
||||
if root_id:
|
||||
ous = (
|
||||
self.organizations_backend.list_organizational_units_for_parent(
|
||||
ParentId=root_id
|
||||
(
|
||||
ous,
|
||||
_,
|
||||
) = self.organizations_backend.list_organizational_units_for_parent(
|
||||
parent_id=root_id
|
||||
)
|
||||
)
|
||||
if any(principal == ou["Arn"] for ou in ous["OrganizationalUnits"]):
|
||||
if any(principal == ou["Arn"] for ou in ous):
|
||||
continue
|
||||
|
||||
raise UnknownResourceException(
|
||||
|
Loading…
Reference in New Issue
Block a user