diff options
Diffstat (limited to 'ishtar_common')
| -rw-r--r-- | ishtar_common/views_item.py | 15 | 
1 files changed, 14 insertions, 1 deletions
| diff --git a/ishtar_common/views_item.py b/ishtar_common/views_item.py index 2577efd12..b8307c457 100644 --- a/ishtar_common/views_item.py +++ b/ishtar_common/views_item.py @@ -1040,7 +1040,7 @@ def get_item(model, func_name, default_name, extra_request_keys=None,          if data_type == "json":              EMPTY = '[]' -        if data_type not in ('json', 'csv', 'json-image'): +        if data_type not in ('json', 'csv', 'json-image', 'json-map'):              return HttpResponse(EMPTY, content_type='text/plain')          model_to_check = model @@ -1396,6 +1396,19 @@ def get_item(model, func_name, default_name, extra_request_keys=None,              query_table_cols.append('main_image__thumbnail')              table_cols.append('main_image__image')              table_cols.append('main_image__thumbnail') +        elif data_type == 'json-map': +            if model.SLUG == "warehouse": +                query_table_cols.append('name') +                table_cols.append('name') +            else: +                query_table_cols.append('cached_label') +                table_cols.append('cached_label') +            if model.SLUG == "find": +                query_table_cols.append('base_finds__point_2d') +                table_cols.append('base_finds__point_2d') +            else: +                query_table_cols.append('point_2d') +                table_cols.append('point_2d')          # manage sort tables          manual_sort_key = None | 
