You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Siddharth Anand (JIRA)" <ji...@apache.org> on 2016/11/15 07:05:58 UTC
[jira] [Resolved] (AIRFLOW-464) Add setdefault method to Variable
Object
[ https://issues.apache.org/jira/browse/AIRFLOW-464?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Siddharth Anand resolved AIRFLOW-464.
-------------------------------------
Resolution: Fixed
> Add setdefault method to Variable Object
> ----------------------------------------
>
> Key: AIRFLOW-464
> URL: https://issues.apache.org/jira/browse/AIRFLOW-464
> Project: Apache Airflow
> Issue Type: Improvement
> Reporter: Ben Tallman
> Assignee: Ben Tallman
> Priority: Trivial
>
> In order to assist with environment migrations, we added a setdefault method to
> the Variable object. This allows default variables to be created (and then
> edited) with less chance for typos/copy+paste bugs.
> Variable.setdefault(key, default, deserialize_json=[True|False]) returns either the
> value stored in Variable(key) or sets Variable(key) = default and returns default.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)