Skip to content

Commit

Permalink
[#4009] Remove get_merged_data
Browse files Browse the repository at this point in the history
In the future, the `data` property could also
be removed, to enforce people using the state wrapper
instead.
  • Loading branch information
Viicos committed Apr 3, 2024
1 parent 3db3497 commit 1e15483
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/openforms/submissions/models/submission.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import logging
import uuid
from dataclasses import dataclass
from typing import TYPE_CHECKING, Mapping
from typing import TYPE_CHECKING, Any, Mapping

from django.conf import settings
from django.db import models, transaction
Expand Down Expand Up @@ -636,12 +636,20 @@ def get_merged_appointment_data(self) -> dict[str, dict[str, str | dict]]:

return appointment_data

def get_merged_data(self) -> dict:
@property
def data(self) -> dict[str, Any]:
"""The filled-in data of the submission.
This is a mapping between variable keys and their corresponding values.
.. note::
Keys containings dots (``.``) will be nested under another mapping.
Static variables values are *not* included.
"""
values_state = self.load_submission_value_variables_state()
return values_state.get_data()

data = property(get_merged_data)

def get_co_signer(self) -> str:
if not self.co_sign_data:
return ""
Expand Down

0 comments on commit 1e15483

Please sign in to comment.