Changeset 17794
- Timestamp:
- 17 May 2024, 07:07:50 (6 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/webservices.py
r17793 r17794 540 540 current_session=None, current_level=None, certcode=None, 541 541 current_mode=None, faccode=None, depcode=None, p_session=None): 542 """Returns bursary data of a subset of students. 543 """ 544 if not current_session: 545 current_session = None 546 if not current_level: 547 current_level = None 548 if not depcode: 549 depcode = None 550 if not certcode: 551 certcode = None 552 if not current_mode: 553 current_mode = None 542 """Returns base data of a subset of students. 543 """ 554 544 hitlist = [] 545 try: 546 current_session = int(current_session) 547 current_level = int(current_level) 548 except (TypeError, ValueError): 549 hitlist.append(dict(error="Wrong parameters")) 550 return hitlist 555 551 cat = queryUtility(ICatalog, name='students_catalog') 556 552 results = cat.searchResults( … … 562 558 depcode=(depcode, depcode), 563 559 ) 560 if len(results) > 500: 561 hitlist.append(dict(error="Too many objects (500 max)")) 562 return hitlist 564 563 for student in results: 565 564 hitlist.append(dict(
Note: See TracChangeset for help on using the changeset viewer.