1
0
mirror of https://github.com/dani-garcia/vaultwarden.git synced 2024-11-08 20:12:34 +01:00

policy data should be null not an empty object

This commit is contained in:
Stefan Melmuk 2023-05-09 11:14:39 +02:00
parent 147c9c7b50
commit 4d5c047ddc
No known key found for this signature in database
GPG Key ID: 817020C608FE9C09

View File

@ -1652,7 +1652,7 @@ async fn get_policy(org_id: &str, pol_type: i32, _headers: AdminHeaders, mut con
let policy = match OrgPolicy::find_by_org_and_type(org_id, pol_type_enum, &mut conn).await {
Some(p) => p,
None => OrgPolicy::new(String::from(org_id), pol_type_enum, "{}".to_string()),
None => OrgPolicy::new(String::from(org_id), pol_type_enum, "null".to_string()),
};
Ok(Json(policy.to_json()))