|
Ran
|
Files
155
|
Run time
6s
|
Badge
README BADGES
|
push
travis-ci
<a href="https://github.com/airbnb/airflow/commit/<a class=hub.com/airbnb/airflow/commit/6069075a7523794f626148b99992687e56e447b8">6069075a7<a href="https://github.com/airbnb/airflow/commit/6069075a7523794f626148b99992687e56e447b8">">[AIRFLOW-1177] Fix Variable.setdefault w/existing JSON Previously due to a logic error if you attempt to use `Variable.setdefault()` with `deserialize_json=True` and the value already existed it would die with: ... my = Variable.setdefault(&#39;regions&#39;, [&#39;uk&#39;], deserialize_json=True) File &quot;/usr/local/lib/python3.5/site- packages/airflow/models.py&quot;, line 3623, in setdefault return json.loads(obj.val) AttributeError: &#39;str&#39; object has no attribute &#39;val&#39; The problem was that the `Variable.get()` call was returning the value, not a variable object. Closes #2540 from ashb/variable-setdefault-json (cherry picked from commit </a><a class="double-link" href="https://github.com/airbnb/airflow/commit/<a class="double-link" href="https://github.com/airbnb/airflow/commit/610f68b22a8277f9521d0b9989b4dd5ce7cbcfe0">610f68b22</a>">610f68b22</a><a href="https://github.com/airbnb/airflow/commit/6069075a7523794f626148b99992687e56e447b8">) Signed-off-by: Bolke de Bruin <bolke@xs4all.nl>
7333 of 10809 relevant lines covered (67.84%)
0.68 hits per line
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
|---|