airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AIRFLOW-3071) Unable to clear Val of Variable from the UI
Date Wed, 03 Oct 2018 12:39:00 GMT

    [ https://issues.apache.org/jira/browse/AIRFLOW-3071?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16636898#comment-16636898
] 

ASF GitHub Bot commented on AIRFLOW-3071:
-----------------------------------------

ron819 closed pull request #3948: [AIRFLOW-3071] clear Val of Variable from the UI
URL: https://github.com/apache/incubator-airflow/pull/3948
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/airflow/www/views.py b/airflow/www/views.py
index d9078caa39..0cd17b0623 100644
--- a/airflow/www/views.py
+++ b/airflow/www/views.py
@@ -2022,11 +2022,10 @@ def variables(self, form):
         try:
             if request.method == 'POST':
                 data = request.json
-                if data:
-                    with create_session() as session:
-                        var = models.Variable(key=form, val=json.dumps(data))
-                        session.add(var)
-                        session.commit()
+                with create_session() as session:
+                    var = models.Variable(key=form, val=json.dumps(data))
+                    session.add(var)
+                    session.commit()
                 return ""
             else:
                 return self.render(


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Unable to clear Val of Variable from the UI
> -------------------------------------------
>
>                 Key: AIRFLOW-3071
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-3071
>             Project: Apache Airflow
>          Issue Type: Bug
>    Affects Versions: 1.10.0
>            Reporter: jack
>            Assignee: jack
>            Priority: Minor
>              Labels: easyfix
>
> This is quite annoying bug.
>  
> Reproduce steps:
>  # Create a Variable.
>  # Give the Variable a Val & save it.
>  # Click edit Variable. You will see the Key with Red {color:#FF0000}*{color} and the
value that you entered.
>  # Remove the Val (leave the field blank) and click save.
>  # No errors will appear. However if you will re-enter to the Variable you will see that
the Blank value was not saved.
>  
> Please allow to remove Val. This is also the intend behavior because the Val has no
{color:#FF0000}*{color} near it.
> The current work around is to delete the Variable and re-create it. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message