I’m putting together a sample baserow plugin which introduces new FieldTypes. The API is well documented (comments on class FieldType in baserow), but one thing eludes me: what is the type of starting_row in FieldType.row_of_dependency_updated ?
seems like I have to do the following to cover all use cases:
if isinstance(starting_row, TableModelQuerySet): # if starting_row is TableModelQuerySet (when creating multiple rows in a batch), we want to iterate over its TableModel objects row_list = starting_row elif isinstance(starting_row, list): # if we have a list, it's a list of TableModels, iterate over them row_list = starting_row else: # we got a single TableModel, transform it into a list of one element row_list = [starting_row]
is this the right way to implement row_of_dependency_updated ? or am I doing something wrong ? Disclaimer: i’m a Django noob but I plan on remedying this soon.