hemanthkodandarama commented on code in PR #39075:
URL: https://github.com/apache/airflow/pull/39075#discussion_r1583463191


##########
airflow/www/views.py:
##########
@@ -4589,7 +4591,10 @@ def varimport(self, session):
                     skipped.add(k)
                     continue
                 try:
-                    models.Variable.set(k, v, serialize_json=not isinstance(v, 
str))
+                    if isinstance(v,dict) and "description" in v and "val" in 
v:
+                        models.Variable.set(k, v["val"], 
description=v["description"], serialize_json=not isinstance(v["val"], str))
+                    else:
+                        models.Variable.set(k, v, serialize_json=not 
isinstance(v, str))

Review Comment:
   this is only to support backward compatibility for import. export always 
uses value as dict



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