Skip to content

Commit

Permalink
Ensure secret field order is correct
Browse files Browse the repository at this point in the history
This commit ensures the secret field order is correct by using ordered
props. Assets may need to be regenerated from other changes (e.g. props
can only be ordered on recent main) in order to see this effect.

Signed-off-by: Nick Gerace <nick@systeminit.com>
  • Loading branch information
nickgerace committed Jun 26, 2024
1 parent 0ba11e4 commit 67d5839
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/dal/src/secret/definition_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,11 @@ impl SecretDefinitionView {
secret_definition_prop_id: PropId,
) -> SecretDefinitionViewResult<Self> {
// Now, find all the fields of the definition.
let field_prop_ids = Prop::direct_child_prop_ids(ctx, secret_definition_prop_id).await?;
let field_props = Prop::direct_child_props_ordered(ctx, secret_definition_prop_id).await?;

// Assemble the form data views.
let mut form_data_views = Vec::new();
for field_prop_id in field_prop_ids {
let field_prop = Prop::get_by_id_or_error(ctx, field_prop_id).await?;
for field_prop in field_props {
form_data_views.push(SecretFormDataView {
name: field_prop.name,
kind: field_prop.kind.to_string(),
Expand Down

0 comments on commit 67d5839

Please sign in to comment.