You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by bo...@apache.org on 2017/05/17 18:53:57 UTC
incubator-airflow git commit: [AIRFLOW-1200] Forbid creation of a
variable with an empty key
Repository: incubator-airflow
Updated Branches:
refs/heads/master 8ac87b2e2 -> 3acfa048a
[AIRFLOW-1200] Forbid creation of a variable with an empty key
Closes #2299 from skudriashev/airflow-1200
Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/3acfa048
Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/3acfa048
Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/3acfa048
Branch: refs/heads/master
Commit: 3acfa048a88342ca059afd9329e7ba4cf1af0929
Parents: 8ac87b2
Author: Stanislav Kudriashev <st...@gmail.com>
Authored: Wed May 17 20:53:50 2017 +0200
Committer: Bolke de Bruin <bo...@xs4all.nl>
Committed: Wed May 17 20:53:50 2017 +0200
----------------------------------------------------------------------
airflow/www/views.py | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/3acfa048/airflow/www/views.py
----------------------------------------------------------------------
diff --git a/airflow/www/views.py b/airflow/www/views.py
index 5d52d5e..69f6c04 100644
--- a/airflow/www/views.py
+++ b/airflow/www/views.py
@@ -2172,13 +2172,20 @@ class VariableView(wwwutils.DataProfilingMixin, AirflowModelView):
'rows': 20,
}
}
+ form_args = {
+ 'key': {
+ 'validators': {
+ validators.DataRequired(),
+ },
+ },
+ }
column_sortable_list = (
'key',
'val',
'is_encrypted',
)
column_formatters = {
- 'val': hidden_field_formatter
+ 'val': hidden_field_formatter,
}
# Default flask-admin export functionality doesn't handle serialized json