Skip to content

Commit

Permalink
Fixes #23590: Remove old parameter check
Browse files Browse the repository at this point in the history
  • Loading branch information
VinceMacBuche committed Oct 17, 2023
1 parent 638f170 commit e501ed5
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ isValidState state =
InvalidState _ -> False

checkParameter param = (not (String.isEmpty param.description)) && (not (Regex.contains ((Regex.fromString >> Maybe.withDefault Regex.never) "[^_a-zA-Z\\d]") param.name))

isValid: Technique -> TechniqueUiInfo -> Bool
isValid t ui =
(isValidState ui.idState ) && ( isValidState ui.nameState ) && (List.all (isValidState) (List.map .validation (Dict.values ui.callsUI)))
Expand Down Expand Up @@ -169,7 +168,6 @@ showTechnique model technique origin ui editInfo =
-- Keep the ID of the method in the UI if it contains invalid parameters value
areErrorOnMethodParameters = List.isEmpty (Dict.keys statesByMethodIdParameter)
areErrorOnMethodCondition = List.isEmpty (Dict.keys statesByMethodIdCondition)
isEmptyParameters = List.any (\p -> String.isEmpty p.name) technique.parameters
isUnchanged = case origin of
Edit t -> t == technique
Creation _ -> False
Expand Down Expand Up @@ -301,7 +299,7 @@ showTechnique model technique origin ui editInfo =
text (if (editInfo.open) then "Visual editor " else "YAML editor")
, i [ class "fa fa-pen"] []
]
, btnSave ui.saving (isUnchanged || not (isValid technique ui) || String.isEmpty technique.name || isEmptyParameters || not areErrorOnMethodParameters || not areErrorOnMethodCondition || not areBlockOnError) StartSaving
, btnSave ui.saving (isUnchanged || not (isValid technique ui) || String.isEmpty technique.name || not areErrorOnMethodParameters || not areErrorOnMethodCondition || not areBlockOnError) StartSaving
]
]
]
Expand Down

0 comments on commit e501ed5

Please sign in to comment.