♻️(backend) refactor get_select_options to take definitions dict
This will allow us to simplify the get_abilities method. It is also more efficient because we have computed this definitions dict and the the get_select_options method was doing the conversion again.
This commit is contained in:
committed by
Anthony LC
parent
18d46acd75
commit
8f67e382ba
@@ -819,7 +819,9 @@ class Document(MP_Node, BaseModel):
|
||||
"ancestors_links_definitions": {
|
||||
k: list(v) for k, v in ancestors_links_definitions.items()
|
||||
},
|
||||
"link_select_options": LinkReachChoices.get_select_options(ancestors_links),
|
||||
"link_select_options": LinkReachChoices.get_select_options(
|
||||
ancestors_links_definitions
|
||||
),
|
||||
"tree": can_get,
|
||||
"update": can_update,
|
||||
"versions_destroy": is_owner_or_admin,
|
||||
|
||||
Reference in New Issue
Block a user