Skip to content

Commit

Permalink
not edit key
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhamraj-git committed Dec 29, 2024
1 parent bb3294a commit 2dfc255
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,12 @@ const VariableForm = ({
<Field.Label fontSize="md">
Key <Field.RequiredIndicator />
</Field.Label>
<Input {...field} required size="sm" />
<Input
{...field}
disabled={Boolean(initialVariable.key)}
required
size="sm"
/>
{fieldState.error ? (
<Field.ErrorText>{fieldState.error.message}</Field.ErrorText>
) : undefined}
Expand Down
3 changes: 0 additions & 3 deletions airflow/ui/src/queries/useEditVariable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,6 @@ export const useEditVariable = (
const editVariable = (addVariableRequestBody: VariableBody) => {
const updateMask: Array<string> = [];

if (addVariableRequestBody.key !== initialVariable.key) {
updateMask.push("key");
}
if (addVariableRequestBody.value !== initialVariable.value) {
updateMask.push("value");
}
Expand Down

0 comments on commit 2dfc255

Please sign in to comment.