0001-WIP-do-not-crash-on-unknown-data-source-type-36037.patch
wcs/data_sources.py | ||
---|---|---|
127 | 127 |
items.sort(key=lambda x: qommon.misc.simplify(x['text'])) |
128 | 128 |
return items |
129 | 129 | |
130 |
if data_source.get('type') not in ('json', 'jsonp', 'formula'): |
|
130 |
if data_source.get('type') and data_source.get('type') not in ('json', 'jsonp', 'formula'):
|
|
131 | 131 |
# named data source |
132 | 132 |
named_data_source = NamedDataSource.get_by_slug(data_source['type']) |
133 | 133 |
if named_data_source.cache_duration: |
... | ... | |
238 | 238 |
if not data_source: |
239 | 239 |
return None |
240 | 240 |
ds_type = data_source.get('type') |
241 |
if not ds_type: |
|
242 |
return None |
|
241 | 243 |
if ds_type in ('json', 'jsonp', 'formula'): |
242 | 244 |
named_data_source = NamedDataSource() |
243 | 245 |
named_data_source.data_source = data_source |
244 |
- |