cache as_operations

This commit is contained in:
Laura Klünder 2024-11-29 16:24:35 +01:00
parent c1f137ed11
commit 6c5aba62ec
2 changed files with 23 additions and 2 deletions

View file

@ -73,7 +73,7 @@ def accesses_mapdata(func):
# For non-direct editing, we will interact with the changeset
with maybe_lock_changeset_to_edit(request=request):
# Turn the changes from the changeset into a list of operations
operations, problems = request.changeset.changes.as_operations # todo: cache this
operations = request.changeset.as_operations
# Enable the overlay manager, temporarily applying the changeset changes
# commit is set to false, meaning all changes will be reset once we leave the manager