Skip to content

Commit

Permalink
Merge pull request #3513 from stefan0xC/fix-empty-policy
Browse files Browse the repository at this point in the history
policy data should be `null` not an empty object
  • Loading branch information
BlackDex authored May 9, 2023
2 parents 147c9c7 + 4d5c047 commit 83bf77d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/core/organizations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()))
Expand Down

0 comments on commit 83bf77d

Please sign in to comment.