diff --git a/bin/export/AILObjects.py b/bin/export/AILObjects.py index 093a0f0f..37560545 100755 --- a/bin/export/AILObjects.py +++ b/bin/export/AILObjects.py @@ -28,15 +28,15 @@ def create_map_obj_event_uuid(event_uuid, global_id): r_serv_objects.sadd('object:map:id_event:{}'.format(global_id), event_uuid) def get_user_list_of_obj_to_export(user_id, add_uuid=False): - set_objs_to_export = [] + objs_to_export = [] res = r_serv_objects.hgetall('user:all_objs_to_export:{}'.format(user_id)) for global_id in res: dict_obj = Correlate_object.get_global_id_from_id(global_id) dict_obj['lvl'] = int(res[global_id]) if add_uuid: obj_dict['uuid'] = str(uuid.uuid4()) - set_objs_to_export.append(dict_obj) - return set_objs_to_export + objs_to_export.append(dict_obj) + return objs_to_export def add_user_object_to_export(user_id, obj_type, obj_id, lvl, obj_subtype=None): ## TODO: check if user exist diff --git a/var/www/blueprints/import_export.py b/var/www/blueprints/import_export.py index ddb3b534..bd8879e1 100644 --- a/var/www/blueprints/import_export.py +++ b/var/www/blueprints/import_export.py @@ -83,7 +83,6 @@ def import_object_file(): @login_analyst def export_object(): user_id = current_user.get_id() - l_obj_to_export = set() # get user saved obj to export l_obj_to_export = AILObjects.get_user_list_of_obj_to_export(user_id) diff --git a/var/www/templates/import_export/block_to_export_input.html b/var/www/templates/import_export/block_to_export_input.html index b5faf733..86ebe14d 100644 --- a/var/www/templates/import_export/block_to_export_input.html +++ b/var/www/templates/import_export/block_to_export_input.html @@ -9,16 +9,16 @@ - - - - - - - - - - + + + + + + + + + + @@ -26,7 +26,8 @@