gristlabs_grist-core/sandbox/grist/grist.py
Alex Hall 267640c277 (core) Use MixedTypesKey for sort_by arg of lookupRecords to avoid errors in Python 3
Summary: title

Test Plan: Added python unit test. Seems like the first test of sort_by in the whole codebase.

Reviewers: dsagal

Reviewed By: dsagal

Differential Revision: https://phab.getgrist.com/D3124
2021-11-09 18:08:29 +02:00

17 lines
677 B
Python

"""
This file packages together other modules needed for usercode in order to create
a consistent API accessible with only "import grist".
"""
# pylint: disable=unused-import
# These imports are used in processing generated usercode.
from usertypes import Any, Text, Blob, Int, Bool, Date, DateTime, \
Numeric, Choice, ChoiceList, Id, Attachments, AltText, ifError
from usertypes import PositionNumber, ManualSortPos, Reference, ReferenceList, formulaType
from table import UserTable
from records import Record, RecordSet
from column import SafeSortKey
DOCS = [(__name__, (Record, RecordSet, UserTable)),
('lookup', (UserTable.lookupOne, UserTable.lookupRecords))]