diff --git a/web/src/api/PolicyBindings.ts b/web/src/api/PolicyBindings.ts index b8bc45f0d..ca54d85e8 100644 --- a/web/src/api/PolicyBindings.ts +++ b/web/src/api/PolicyBindings.ts @@ -5,8 +5,7 @@ import { User } from "./Users"; export class PolicyBinding { pk: string; - policy: string; - policy_obj?: Policy; + policy?: Policy; group?: Group; user?: User; target: string; diff --git a/web/src/elements/policies/BoundPoliciesList.ts b/web/src/elements/policies/BoundPoliciesList.ts index 1e33101e8..298bc2d28 100644 --- a/web/src/elements/policies/BoundPoliciesList.ts +++ b/web/src/elements/policies/BoundPoliciesList.ts @@ -33,8 +33,8 @@ export class BoundPoliciesList extends Table { } getPolicyUserGroupRow(item: PolicyBinding): string { - if (item.policy_obj) { - return gettext(`Policy ${item.policy_obj.name}`); + if (item.policy) { + return gettext(`Policy ${item.policy.name}`); } else if (item.group) { return gettext(`Group ${item.group.name}`); } else if (item.user) {