mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Simplify InitNewDoc since the timezone and locale is never actually used
Summary: InitNewDoc is essentially only used to generate initialDocSql, so it doesn't make sense to set the timezone and locale. They are always set when actually creating a new doc anyway. Discussed in https://grist.slack.com/archives/C0234CPPXPA/p1650312714217089. Test Plan: this Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D3394
This commit is contained in:
@@ -275,14 +275,12 @@ class UserActions(object):
|
||||
#----------------------------------------
|
||||
|
||||
@useraction
|
||||
def InitNewDoc(self, timezone, locale):
|
||||
def InitNewDoc(self):
|
||||
creation_actions = schema.schema_create_actions()
|
||||
self._engine.out_actions.stored.extend(creation_actions)
|
||||
self._engine.out_actions.direct += [True] * len(creation_actions)
|
||||
self._do_doc_action(actions.AddRecord("_grist_DocInfo", 1,
|
||||
{'schemaVersion': schema.SCHEMA_VERSION,
|
||||
'timezone': timezone,
|
||||
'documentSettings': json.dumps({'locale': locale})}))
|
||||
{'schemaVersion': schema.SCHEMA_VERSION}))
|
||||
|
||||
# Set up initial ACL data.
|
||||
# NOTE The special records below are not actually used. They were intended for obsolete ACL
|
||||
|
||||
Reference in New Issue
Block a user