mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Add 'user' variable to trigger formulas
Summary: The 'user' variable has a similar API to the one from access rules: it contains properties about a user, such as their full name and email address, as well as optional, user-defined attributes that are populated via user attribute tables. Test Plan: Python unit tests. Reviewers: alexmojaki, paulfitz, dsagal Reviewed By: alexmojaki, dsagal Subscribers: paulfitz, dsagal, alexmojaki Differential Revision: https://phab.getgrist.com/D2898
This commit is contained in:
@@ -82,11 +82,7 @@ class BaseColumn(object):
|
||||
'method' function. The method may refer to variables in the generated "usercode" module, and
|
||||
it's important that all such references are to the rebuilt "usercode" module.
|
||||
"""
|
||||
if not self._is_formula and method:
|
||||
# Include the current value of the cell as the third parameter (to default formulas).
|
||||
self.method = lambda rec, table: method(rec, table, self.get_cell_value(int(rec)))
|
||||
else:
|
||||
self.method = method
|
||||
self.method = method
|
||||
|
||||
def is_formula(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user