diff --git a/src/runtime/rest/api.org b/src/runtime/rest/api.org index 7d7fff7..53bdf2c 100755 --- a/src/runtime/rest/api.org +++ b/src/runtime/rest/api.org @@ -3159,7 +3159,7 @@ class TestAddLab(TestCase): :PROPERTIES: :CUSTOM_ID: api_update_lab_by_labid :END: - - URL :: /labs/ + - URL :: /labs?lab_id= - Method :: PUT @@ -3167,45 +3167,18 @@ class TestAddLab(TestCase): - Payload :: #+BEGIN_EXAMPLE -{ - "key" : , - "lab": { - "name": "Computer Programming", - "overview": "cp overview", - "discipline_id": "ECE", - "institute_id": "IITKgp", - "developers": [ - { - "name": "Prof. Pallavi Pawar", - "email": "pallavi.pawar@gmail.com" - } - ], - "hosting_info": [ - { - "hosting_status": "hosted", - "hosted_on": "server", - "hosted_url": "http://iitk.vlab.co.in/" - } - ], - "integration_level": 3, - "assets": [ - { - "asset_type": "image", - "path": "vlabs.ac.in/images/video/icon.png" - } - ], - "sections": [ - { - "name": "Theory" - } - - ], - "experiments": [ - - ] +{ +"lab":{ + "assets": [ + { + "asset_type": "image", + "path": "iiit-h-cse02.jpg" + } + ] +}, - } - } + "key": "defaultkey" +} #+END_EXAMPLE - Success Response @@ -3215,54 +3188,779 @@ class TestAddLab(TestCase): { "assets": [ { - "asset_type": "image", - "id": "3", - "path": "vlabs.ac.in/images/video/icon.png" + "asset_type": { + "asset_type": "image", + "id": "1" + }, + "id": "165", + "path": "iiit-h-cse02.jpg" } ], - "developers": [ + "developers": [], + "discipline": { + "assets": [ + { + "asset_type": { + "asset_type": "image", + "id": "1" + }, + "id": "150", + "path": "computer-science-and-engineering.png" + } + ], + "discipline_id": "cse", + "discipline_name": "Computer Science and Engineering", + "id": "6" + }, + "experiments": [ { - "email": { - "email": "pallavi.pawar@gmail.com", - "id": "3" + "assets": [ + { + "asset_type": { + "asset_type": "image", + "id": "1" + }, + "id": "84", + "path": "../../static/IIITH-Computer-Programming.jpg" + } + ], + "developers": [], + "discipline": { + "assets": [ + "Not Printing" + ], + "discipline_id": "cse", + "discipline_name": "Computer Science and Engineering", + "id": "6" }, - "id": "3", - "name": { - "id": "3", - "name": "Prof. Pallavi Pawar" - } + "exp_id": "e99800", + "exp_name": "Numerical Approximation", + "hosting_info": [ + { + "hosted_on": "cloud", + "hosted_url": "http://cse02-iiith.vlabs.ac.in/", + "hosting_status": "hosted", + "id": "442" + } + ], + "id": "1198", + "institute": { + "assets": [ + "Not Printing" + ], + "id": "7", + "institute_id": "iiith", + "institute_name": "IIIT Hyderabad" + }, + "integration_status": { + "id": "1", + "integration_level": 0 + }, + "overview": "This experiments deals with Numerical Approximation", + "sections": [ + { + "id": "10", + "name": "Introduction" + }, + { + "id": "3", + "name": "Theory" + }, + { + "id": "171", + "name": "Objective" + }, + { + "id": "191", + "name": "Manual" + }, + { + "id": "4", + "name": "Procedure" + }, + { + "id": "303", + "name": "Further Reading" + } + ] + }, + { + "assets": [ + { + "asset_type": { + "asset_type": "image", + "id": "1" + }, + "id": "84", + "path": "../../static/IIITH-Computer-Programming.jpg" + } + ], + "developers": [], + "discipline": { + "assets": [ + "Not Printing" + ], + "discipline_id": "cse", + "discipline_name": "Computer Science and Engineering", + "id": "6" + }, + "exp_id": "e99799", + "exp_name": "Functions", + "hosting_info": [ + { + "hosted_on": "cloud", + "hosted_url": "http://cse02-iiith.vlabs.ac.in/", + "hosting_status": "hosted", + "id": "442" + } + ], + "id": "1201", + "institute": { + "assets": [ + "Not Printing" + ], + "id": "7", + "institute_id": "iiith", + "institute_name": "IIIT Hyderabad" + }, + "integration_status": { + "id": "1", + "integration_level": 0 + }, + "overview": "This experiments deals with Functions", + "sections": [ + { + "id": "10", + "name": "Introduction" + }, + { + "id": "3", + "name": "Theory" + }, + { + "id": "171", + "name": "Objective" + }, + { + "id": "191", + "name": "Manual" + }, + { + "id": "4", + "name": "Procedure" + }, + { + "id": "303", + "name": "Further Reading" + } + ] + }, + { + "assets": [ + { + "asset_type": { + "asset_type": "image", + "id": "1" + }, + "id": "84", + "path": "../../static/IIITH-Computer-Programming.jpg" + } + ], + "developers": [], + "discipline": { + "assets": [ + "Not Printing" + ], + "discipline_id": "cse", + "discipline_name": "Computer Science and Engineering", + "id": "6" + }, + "exp_id": "e99798", + "exp_name": "Advanced Control Flow", + "hosting_info": [ + { + "hosted_on": "cloud", + "hosted_url": "http://cse02-iiith.vlabs.ac.in/", + "hosting_status": "hosted", + "id": "442" + } + ], + "id": "1202", + "institute": { + "assets": [ + "Not Printing" + ], + "id": "7", + "institute_id": "iiith", + "institute_name": "IIIT Hyderabad" + }, + "integration_status": { + "id": "1", + "integration_level": 0 + }, + "overview": "This experiments deals with Advanced Control Flow", + "sections": [ + { + "id": "10", + "name": "Introduction" + }, + { + "id": "3", + "name": "Theory" + }, + { + "id": "171", + "name": "Objective" + }, + { + "id": "191", + "name": "Manual" + }, + { + "id": "4", + "name": "Procedure" + }, + { + "id": "303", + "name": "Further Reading" + } + ] + }, + { + "assets": [ + { + "asset_type": { + "asset_type": "image", + "id": "1" + }, + "id": "84", + "path": "../../static/IIITH-Computer-Programming.jpg" + } + ], + "developers": [], + "discipline": { + "assets": [ + "Not Printing" + ], + "discipline_id": "cse", + "discipline_name": "Computer Science and Engineering", + "id": "6" + }, + "exp_id": "e99797", + "exp_name": "Arrays", + "hosting_info": [ + { + "hosted_on": "cloud", + "hosted_url": "http://cse02-iiith.vlabs.ac.in/", + "hosting_status": "hosted", + "id": "442" + } + ], + "id": "1204", + "institute": { + "assets": [ + "Not Printing" + ], + "id": "7", + "institute_id": "iiith", + "institute_name": "IIIT Hyderabad" + }, + "integration_status": { + "id": "1", + "integration_level": 0 + }, + "overview": "This experiments deals with Arrays", + "sections": [ + { + "id": "10", + "name": "Introduction" + }, + { + "id": "3", + "name": "Theory" + }, + { + "id": "171", + "name": "Objective" + }, + { + "id": "191", + "name": "Manual" + }, + { + "id": "4", + "name": "Procedure" + }, + { + "id": "303", + "name": "Further Reading" + } + ] + }, + { + "assets": [ + { + "asset_type": { + "asset_type": "image", + "id": "1" + }, + "id": "84", + "path": "../../static/IIITH-Computer-Programming.jpg" + } + ], + "developers": [], + "discipline": { + "assets": [ + "Not Printing" + ], + "discipline_id": "cse", + "discipline_name": "Computer Science and Engineering", + "id": "6" + }, + "exp_id": "e99796", + "exp_name": "Structures", + "hosting_info": [ + { + "hosted_on": "cloud", + "hosted_url": "http://cse02-iiith.vlabs.ac.in/", + "hosting_status": "hosted", + "id": "442" + } + ], + "id": "1197", + "institute": { + "assets": [ + "Not Printing" + ], + "id": "7", + "institute_id": "iiith", + "institute_name": "IIIT Hyderabad" + }, + "integration_status": { + "id": "1", + "integration_level": 0 + }, + "overview": "This experiments deals with Structures", + "sections": [ + { + "id": "10", + "name": "Introduction" + }, + { + "id": "3", + "name": "Theory" + }, + { + "id": "171", + "name": "Objective" + }, + { + "id": "191", + "name": "Manual" + }, + { + "id": "4", + "name": "Procedure" + }, + { + "id": "303", + "name": "Further Reading" + } + ] + }, + { + "assets": [ + { + "asset_type": { + "asset_type": "image", + "id": "1" + }, + "id": "84", + "path": "../../static/IIITH-Computer-Programming.jpg" + } + ], + "developers": [], + "discipline": { + "assets": [ + "Not Printing" + ], + "discipline_id": "cse", + "discipline_name": "Computer Science and Engineering", + "id": "6" + }, + "exp_id": "e99795", + "exp_name": "Basic Control Flow", + "hosting_info": [ + { + "hosted_on": "cloud", + "hosted_url": "http://cse02-iiith.vlabs.ac.in/", + "hosting_status": "hosted", + "id": "442" + } + ], + "id": "1199", + "institute": { + "assets": [ + "Not Printing" + ], + "id": "7", + "institute_id": "iiith", + "institute_name": "IIIT Hyderabad" + }, + "integration_status": { + "id": "1", + "integration_level": 0 + }, + "overview": "This experiments deals with Basic Control Flow", + "sections": [ + { + "id": "10", + "name": "Introduction" + }, + { + "id": "3", + "name": "Theory" + }, + { + "id": "171", + "name": "Objective" + }, + { + "id": "191", + "name": "Manual" + }, + { + "id": "4", + "name": "Procedure" + }, + { + "id": "303", + "name": "Further Reading" + } + ] + }, + { + "assets": [ + { + "asset_type": { + "asset_type": "image", + "id": "1" + }, + "id": "84", + "path": "../../static/IIITH-Computer-Programming.jpg" + } + ], + "developers": [], + "discipline": { + "assets": [ + "Not Printing" + ], + "discipline_id": "cse", + "discipline_name": "Computer Science and Engineering", + "id": "6" + }, + "exp_id": "e99794", + "exp_name": "Strings", + "hosting_info": [ + { + "hosted_on": "cloud", + "hosted_url": "http://cse02-iiith.vlabs.ac.in/", + "hosting_status": "hosted", + "id": "442" + } + ], + "id": "1203", + "institute": { + "assets": [ + "Not Printing" + ], + "id": "7", + "institute_id": "iiith", + "institute_name": "IIIT Hyderabad" + }, + "integration_status": { + "id": "1", + "integration_level": 0 + }, + "overview": "This experiments deals with Strings", + "sections": [ + { + "id": "10", + "name": "Introduction" + }, + { + "id": "3", + "name": "Theory" + }, + { + "id": "171", + "name": "Objective" + }, + { + "id": "191", + "name": "Manual" + }, + { + "id": "4", + "name": "Procedure" + }, + { + "id": "303", + "name": "Further Reading" + } + ] + }, + { + "assets": [ + { + "asset_type": { + "asset_type": "image", + "id": "1" + }, + "id": "84", + "path": "../../static/IIITH-Computer-Programming.jpg" + } + ], + "developers": [], + "discipline": { + "assets": [ + "Not Printing" + ], + "discipline_id": "cse", + "discipline_name": "Computer Science and Engineering", + "id": "6" + }, + "exp_id": "e99793", + "exp_name": "Pointers", + "hosting_info": [ + { + "hosted_on": "cloud", + "hosted_url": "http://cse02-iiith.vlabs.ac.in/", + "hosting_status": "hosted", + "id": "442" + } + ], + "id": "1196", + "institute": { + "assets": [ + "Not Printing" + ], + "id": "7", + "institute_id": "iiith", + "institute_name": "IIIT Hyderabad" + }, + "integration_status": { + "id": "1", + "integration_level": 0 + }, + "overview": "This experiments deals with Pointers", + "sections": [ + { + "id": "10", + "name": "Introduction" + }, + { + "id": "3", + "name": "Theory" + }, + { + "id": "171", + "name": "Objective" + }, + { + "id": "191", + "name": "Manual" + }, + { + "id": "4", + "name": "Procedure" + }, + { + "id": "303", + "name": "Further Reading" + } + ] + }, + { + "assets": [ + { + "asset_type": { + "asset_type": "image", + "id": "1" + }, + "id": "84", + "path": "../../static/IIITH-Computer-Programming.jpg" + } + ], + "developers": [], + "discipline": { + "assets": [ + "Not Printing" + ], + "discipline_id": "cse", + "discipline_name": "Computer Science and Engineering", + "id": "6" + }, + "exp_id": "e99792", + "exp_name": "Recursion", + "hosting_info": [ + { + "hosted_on": "cloud", + "hosted_url": "http://cse02-iiith.vlabs.ac.in/", + "hosting_status": "hosted", + "id": "442" + } + ], + "id": "1200", + "institute": { + "assets": [ + "Not Printing" + ], + "id": "7", + "institute_id": "iiith", + "institute_name": "IIIT Hyderabad" + }, + "integration_status": { + "id": "1", + "integration_level": 0 + }, + "overview": "This experiments deals with Recursion", + "sections": [ + { + "id": "10", + "name": "Introduction" + }, + { + "id": "3", + "name": "Theory" + }, + { + "id": "171", + "name": "Objective" + }, + { + "id": "191", + "name": "Manual" + }, + { + "id": "4", + "name": "Procedure" + }, + { + "id": "303", + "name": "Further Reading" + } + ] + }, + { + "assets": [ + { + "asset_type": { + "asset_type": "image", + "id": "1" + }, + "id": "84", + "path": "../../static/IIITH-Computer-Programming.jpg" + } + ], + "developers": [], + "discipline": { + "assets": [ + "Not Printing" + ], + "discipline_id": "cse", + "discipline_name": "Computer Science and Engineering", + "id": "6" + }, + "exp_id": "e99791", + "exp_name": "Expression Evaluation", + "hosting_info": [ + { + "hosted_on": "cloud", + "hosted_url": "http://cse02-iiith.vlabs.ac.in/", + "hosting_status": "hosted", + "id": "442" + } + ], + "id": "1205", + "institute": { + "assets": [ + "Not Printing" + ], + "id": "7", + "institute_id": "iiith", + "institute_name": "IIIT Hyderabad" + }, + "integration_status": { + "id": "1", + "integration_level": 0 + }, + "overview": "This experiments deals with Expression Evaluation", + "sections": [ + { + "id": "10", + "name": "Introduction" + }, + { + "id": "3", + "name": "Theory" + }, + { + "id": "171", + "name": "Objective" + }, + { + "id": "191", + "name": "Manual" + }, + { + "id": "4", + "name": "Procedure" + }, + { + "id": "303", + "name": "Further Reading" + } + ] } ], - "discipline": { - "assets": [], - "discipline_id": "ece", - "discipline_name": "Electronics and Communication", - "id": "8" - }, - "experiments": [], "hosting_info": [ { - "hosted_on": "server", - "hosted_url": "http://iitk.vlab.co.in/", + "hosted_on": "cloud", + "hosted_url": "http://cse02-iiith.vlabs.ac.in/", "hosting_status": "hosted", - "id": "4" + "id": "442" } ], - "id": "1", + "id": "76", "institute": { - "assets": [], - "id": "9", - "institute_id": "iitkgp", - "institute_name": "IIT Kharagpur" + "assets": [ + { + "asset_type": { + "asset_type": "image", + "id": "1" + }, + "id": "156", + "path": "iiit-hyderabad.png" + } + ], + "id": "7", + "institute_id": "iiith", + "institute_name": "IIIT Hyderabad" }, "integration_status": { - "id": "4", - "integration_level": 3 + "id": "1", + "integration_level": 0 }, "lab_id": "cse02", "lab_name": "Computer Programming", - "overview": "cp overview", - "sections": [] + "overview": "This lab deals with Computer Programming", + "sections": [ + { + "id": "10", + "name": "Introduction" + } + ] } #+END_EXAMPLE @@ -8639,7 +9337,7 @@ class TestGetSectionbyid(TestCase): :PROPERTIES: :CUSTOM_ID: api_update_institutes_by_instid :END: - - URL :: /institutes? + - URL :: /institutes?institute_id= - Method :: PUT @@ -8648,9 +9346,14 @@ class TestGetSectionbyid(TestCase): - Payload :: #+BEGIN_EXAMPLE { -"institute_name": "IIIT Hydfdfdd", -"key": "defaultkey", + "assets": [ + { + "asset_type": "image", + "path": "amrita-university.png" + } + ], + "key": "defaultkey" } #+END_EXAMPLE @@ -8659,17 +9362,19 @@ class TestGetSectionbyid(TestCase): + Contents : #+BEGIN_EXAMPLE { - "id": 1, - "institute_id": "iiith", - "institute_name": "IIIT Hydfdfdd", "assets": [ - { - "asset_type": "Image", - "id": 1, - "path": "vlabs.ac.in/images/static/logo.png" - } - ] - + { + "asset_type": { + "asset_type": "image", + "id": "1" + }, + "id": "153", + "path": "amrita-university.png" + } + ], + "id": "1", + "institute_id": "amrita", + "institute_name": "Amrita University" } #+END_EXAMPLE @@ -8681,7 +9386,7 @@ class TestGetSectionbyid(TestCase): - Example: #+BEGIN_EXAMPLE - http://localhost:5000/institutes?institute_id=iiith + http://localhost:5000/institutes?institute_id=amrita #+END_EXAMPLE *** Implementation @@ -8967,7 +9672,7 @@ class TestDeleteInstitute(TestCase): :PROPERTIES: :CUSTOM_ID: api_update_disciplines_by_disid :END: - - URL :: /disciplines/ + - URL :: /disciplines?discipline_id= - Method :: PUT @@ -8976,32 +9681,35 @@ class TestDeleteInstitute(TestCase): - Payload :: #+BEGIN_EXAMPLE { -"discipline_name": "Auto Mobiles and Engineering", -"assets": [ - { - "asset_type": "Image", - "path": "vlabs.ac.in/images/static/logo.png" - } - ], + "assets": [ + { + "asset_type": "image", + "path": "physical-sciences.png" + } + ], - "key": "" + "key": "defaultkey" } + #+END_EXAMPLE - Success Response + Status_Code: 200 + Contents : #+BEGIN_EXAMPLE { -"assets": [ - { - "asset_type": "Image", - "id": 1, - "path": "vlabs.ac.in/images/static/logo.png" - } - ], - "discipline_id": "ab", - "discipline_name": "Auto Mobiles and Engineering", - "id": 15 + "assets": [ + { + "asset_type": { + "asset_type": "image", + "id": "1" + }, + "id": "160", + "path": "physical-sciences.png" + } + ], + "discipline_id": "phy-sc", + "discipline_name": "Physical Sciences", + "id": "11" } #+END_EXAMPLE @@ -9013,7 +9721,7 @@ class TestDeleteInstitute(TestCase): - Example: #+BEGIN_EXAMPLE - http://localhost:5000/disciplines?discipline_id=cse + http://localhost:5000/disciplines?discipline_id=phy-sc #+END_EXAMPLE *** Implementation diff --git a/src/runtime/system/system-interface.org b/src/runtime/system/system-interface.org index 4737e7a..30c91e1 100755 --- a/src/runtime/system/system-interface.org +++ b/src/runtime/system/system-interface.org @@ -5360,88 +5360,107 @@ class TestGetNameById(TestCase): overview=data_dict['lab']['overview'] if 'institute_id' not in data_dict['lab']: - inst=str(lab.get("institute")) + institute = lab.get("institute") else: - inst = System.do("get_institute", institute_id= + institute = System.do("get_institute", institute_id= data_dict['lab']['institute_id']) if 'discipline_id' not in data_dict['lab']: - dis=str(lab.get("discipline")) + discipline = lab.get("discipline") else: - dis = System.do("get_discipline", discipline_id= + discipline = System.do("get_discipline", discipline_id= data_dict['lab']['discipline_id']) if 'integration_level' not in data_dict['lab']: - integration_status=str(lab.get("integration_status")) + integration_status = lab.get("integration_status") else: integration_status = System.do("get_integration_status_by_IL", integration_level=data_dict['lab']['integration_level']) - hosting_info = data_dict['lab']['hosting_info'] - hosting_info_list = [] - for hosting_info_x in hosting_info: - hosting_info = System.do("get_hosting_info", - hosted_url= - hosting_info_x['hosted_url']) - if hosting_info is None: - hosting_info = hosting_info_cls(hosting_status=str(hosting_info_x['hosting_status']), \ - hosted_url=str(hosting_info_x['hosted_url']), hosted_on=str(hosting_info_x['hosted_on'])) - hosting_info = System.do("add_hosting_info", hosting_info=hosting_info, session=session) - hosting_info_list.append(hosting_info) - - assets = data_dict['lab']['assets'] - asset_list = [] - - for asset_x in assets: - asset = System.do("get_asset", path=asset_x['path']) - if asset is None: - asset_type = asset_type_cls(asset_type=\ - str(asset_x['asset_type'])) - asset = asset_cls(asset_type=asset_type, \ - path=str(asset_x['path'])) - asset = System.do("add_asset", asset=asset, session=session) - asset_list.append(asset) - - section_list=[] - for section in data_dict['lab']['sections']: - if 'experiments' in section.keys(): - experiments = section['experiments'] - else: - section_list.append(section['name']) - - section_obj_list=[] - for section_x in section_obj_list: - section = System.do("get_section", name=section_x['name']) - if section is None: - section = section_cls(name=str(section_x['name'])) - section = System.do("add_section", section=section, session=session) - section_obj_list.append(section) - - developers = data_dict['lab']['developers'] - developer_list = [] - for developer_x in developers: - name = name_cls(name=developer_x['name']) - email = email_cls(email=developer_x['email']) - developer = System.do("get_developer", email=email) - if developer is None: - developer = developer_cls(name=name, email=email) - developer = System.do("add_developer", developer=developer, session=session) - developer_list.append(developer) - - experiments = data_dict['lab']['experiments'] - - exp_list = [] - for e_id in experiments: - experiment = System.do("get_experiment", exp_id=e_id) - exp_list.append(experiment) + if 'hosting_info' not in data_dict['lab']: + hosting_info_list = lab.get("hosting_info") + else: + hosting_info = data_dict['lab']['hosting_info'] + hosting_info_list = [] + for hosting_info_x in hosting_info: + hosting_info = System.do("get_hosting_info", + hosted_url= + hosting_info_x['hosted_url']) + if hosting_info is None: + hosting_info = hosting_info_cls\ + (hosting_status=str(hosting_info_x['hosting_status']), \ + hosted_url=str(hosting_info_x['hosted_url']), \ + hosted_on=str(hosting_info_x['hosted_on'])) + hosting_info = System.do("add_hosting_info", + hosting_info=hosting_info, + session=session) + hosting_info_list.append(hosting_info) + + if 'assets' not in data_dict['lab']: + asset_list = lab.get("assets") + logger.debug("assets=%s", asset_list) + else: + assets = data_dict['lab']['assets'] + asset_list = [] + for asset_x in assets: + asset = System.do("get_asset", path=asset_x['path']) + if asset is None: + asset_type = asset_type_cls(asset_type=\ + str(asset_x['asset_type'])) + asset = asset_cls(asset_type=asset_type, \ + path=str(asset_x['path'])) + asset = System.do("add_asset", asset=asset, session=session) + asset_list.append(asset) + + if 'sections' not in data_dict['lab']: + section_obj_list = lab.get("sections") + else: + section_list=[] + for section in data_dict['lab']['sections']: + if 'experiments' in section.keys(): + experiments = section['experiments'] + else: + section_list.append(section['name']) + + section_obj_list=[] + for section_x in section_obj_list: + section = System.do("get_section", name=section_x['name']) + if section is None: + section = section_cls(name=str(section_x['name'])) + section = System.do("add_section", section=section, session=session) + section_obj_list.append(section) + + if 'developers' not in data_dict['lab']: + developer_list = lab.get("developers") + else: + developers = data_dict['lab']['developers'] + developer_list = [] + for developer_x in developers: + name = name_cls(name=developer_x['name']) + email = email_cls(email=developer_x['email']) + developer = System.do("get_developer", email=email) + if developer is None: + developer = developer_cls(name=name, email=email) + developer = System.do("add_developer", developer=developer, + session=session) + developer_list.append(developer) + + if 'experiments' not in data_dict['lab']: + exp_list = lab.get("experiments") + else: + experiments = data_dict['lab']['experiments'] + exp_list = [] + for e_id in experiments: + experiment = System.do("get_experiment", exp_id=e_id) + exp_list.append(experiment) try: current_app.logger.debug("running operation update_lab") lab = System.do("update_lab", lab=lab, lab_name=lab_name, overview=overview, session=session, - institute=inst, - discipline=dis, + institute=institute, + discipline=discipline, hosting_info=hosting_info_list, assets=asset_list, experiments=exp_list, @@ -5450,6 +5469,7 @@ class TestGetNameById(TestCase): integration_status=integration_status) current_app.logger.debug("completed operation update_lab") return lab.to_client() + except (ArityError, TypeError, NotAuthorizedError, StateError) as err: current_app.logger.error("Exception = %s" % str(err)) raise err