fix(realm): when updating realms, don't send the type

This commit is contained in:
transcaffeine 2022-08-24 13:08:38 +02:00
parent e72d920b73
commit c26f63fa53
Signed by: transcaffeine
GPG Key ID: 03624C433676E465
1 changed files with 3 additions and 1 deletions

View File

@ -28,7 +28,9 @@ def set_realm_data(auth_info: ProxmoxAuthInfo, realm: str, config: dict[str, str
if existing_realm.ok:
existing_realm_data = existing_realm.json()['data']
if not dry_run:
realm_res = _proxmox_request('put', f"/access/domains/{realm}", auth_info, data=config)
put_args_denylist = ['type']
put_config = {k: v for k, v in config.items() if k not in put_args_denylist}
realm_res = _proxmox_request('put', f"/access/domains/{realm}", auth_info, data=put_config)
realm_res.raise_for_status()
else:
if not dry_run: