Skip to content

Commit

Permalink
👌 [#3215] PR Feedback 1
Browse files Browse the repository at this point in the history
  • Loading branch information
SilviaAmAm committed Jul 11, 2023
1 parent e07b4bf commit 30ca07b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
4 changes: 2 additions & 2 deletions docs/manual/forms/form_fields.rst
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ Prefill
-------

* **Plugin**: Welke prefill plugin te gebruiken om data op te halen over de persoon/het bedrijf die ingelogd is.
* **Pluginattribuut**: Welke attribuut van de prefill-backend data te gebruiken om deze component te prefillen.
* **Identifier rol**: In het geval dat de gebruiker met DigiD Machtigen en eHerkenning Bewindvoering heeft ingelogd, moeten de gegevens gerelateerd aan het 'hoofd identifier' worden gebruikt, of die gerelateerd aan de gemachtigde persoon?
* **Pluginattribuut**: Welk attribuut van de prefill-backend data te gebruiken om deze component voorin te vullen.
* **Identifier rol**: In het geval dat de gebruiker met DigiD Machtigen of eHerkenning Bewindvoering heeft ingelogd: van welke rol moeten de gegevens gebruikt worden, die van de 'hoofd identifier' worden gebruikt, of die van de gemachtigde persoon?


Globale configuratieopties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def add_claims_to_sessions_if_not_cosigning(self, claim, request):
if not claim or CO_SIGN_PARAMETER in request.GET:
return

Check warning on line 156 in src/openforms/authentication/contrib/digid_eherkenning_oidc/plugin.py

View check run for this annotation

Codecov / codecov/patch

src/openforms/authentication/contrib/digid_eherkenning_oidc/plugin.py#L156

Added line #L156 was not covered by tests

config = OpenIDConnectDigiDMachtigenConfig.get_solo()
config = self.config_class.get_solo()
machtigen_data = request.session[DIGID_MACHTIGEN_OIDC_AUTH_SESSION_KEY]
request.session[FORM_AUTH_SESSION_KEY] = {

Check warning on line 160 in src/openforms/authentication/contrib/digid_eherkenning_oidc/plugin.py

View check run for this annotation

Codecov / codecov/patch

src/openforms/authentication/contrib/digid_eherkenning_oidc/plugin.py#L158-L160

Added lines #L158 - L160 were not covered by tests
"plugin": self.identifier,
Expand Down
5 changes: 1 addition & 4 deletions src/openforms/prefill/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,7 @@ def prefill_variables(submission: "Submission", register=None) -> None:
attribute_name = variable.form_variable.prefill_attribute
identifier_role = variable.form_variable.prefill_identifier_role

if not grouped_fields[plugin_id].get(identifier_role):
grouped_fields[plugin_id][identifier_role] = []

grouped_fields[plugin_id][identifier_role].append(attribute_name)
grouped_fields[plugin_id].setdefault(identifier_role, []).append(attribute_name)

results = _fetch_prefill_values(grouped_fields, submission, register)

Expand Down
4 changes: 2 additions & 2 deletions src/openforms/prefill/tests/test_prefill_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class PrefillHookTests(TransactionTestCase):
"openforms.prefill.contrib.haalcentraal.plugin.HaalCentraalPrefill.get_prefill_values",
return_value={"naam.voornamen": "John", "naam.geslachtsnaam": "Dodo"},
)
def test_fetch_values_with_multiple_bsn(self, m_bsn):
def test_fetch_values_with_multiple_people(self, m_haal_centraal):
components = [
{
"key": "mainPersonName",
Expand Down Expand Up @@ -165,7 +165,7 @@ def test_fetch_values_with_multiple_bsn(self, m_bsn):
"openforms.prefill.contrib.kvk.plugin.KVK_KVKNumberPrefill.get_prefill_values",
return_value={"bezoekadres.postcode": "1111 AA"},
)
def test_fetch_values_with_kvk_and_bsn(self, m_kvk, m_bsn):
def test_fetch_values_with_legal_entity_and_person(self, m_kvk, m_haal_centraal):
components = [
{
"key": "companyPostcode",
Expand Down

0 comments on commit 30ca07b

Please sign in to comment.