henry3260 commented on code in PR #70944:
URL: https://github.com/apache/airflow/pull/70944#discussion_r3710052037


##########
airflow-core/src/airflow/cli/commands/variable_command.py:
##########
@@ -186,11 +186,16 @@ def variables_export(args):
 
         data = json.JSONDecoder()
         for var in qry:
+            # Emit a form variables_import turns back into var.val: it stores 
strings verbatim,
+            # JSON-encodes everything else, and unwraps any dict carrying a 
"value" key.
             try:
                 val = data.decode(var.val)
             except Exception:
                 val = var.val
-            if var.description:
+            else:
+                if isinstance(val, str):
+                    val = var.val

Review Comment:
   ```suggestion
               if isinstance(val, str):
                   val = var.val
   ```



-- 
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]

Reply via email to