pierrejeambrun commented on code in PR #55558:
URL: https://github.com/apache/airflow/pull/55558#discussion_r2355833928
##########
airflow-core/src/airflow/ui/src/pages/Connections/ConnectionForm.tsx:
##########
@@ -96,6 +96,19 @@ const ConnectionForm = ({
mutateConnection(data);
};
+ // Check if extra fields have changed by comparing with initial connection
+ const isExtraFieldsDirty = (() => {
+ try {
+ const initialParsed = JSON.parse(initialConnection.extra) as
Record<string, unknown>;
+ const currentParsed = JSON.parse(extra) as Record<string, unknown>;
+
+ return JSON.stringify(initialParsed) !== JSON.stringify(currentParsed);
+ } catch {
+ // If parsing fails, fall back to string comparison
+ return extra !== initialConnection.extra;
+ }
+ })();
Review Comment:
Also you probably don't need to define a function and call that right away
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]