Skip to content

Commit 9302e88

Browse files
For primary name citation, show the name as given on the form.
This helps the user confirm the action is correct.
1 parent 04ded96 commit 9302e88

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Form/UK1841.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,12 @@ def populate_model(self, db, citation, form_event, model):
4949
include_classes=['Person']):
5050
handle = item[1]
5151
person = db.get_person_from_handle(handle)
52-
model.append(parent, (name_displayer.display(person), name_displayer.display(person),
53-
lambda db, trans, citation_handle = citation.handle, person_handle = person.handle: PrimaryNameCitation.command(db, trans, citation_handle, person_handle)))
52+
for event_ref in person.get_event_ref_list():
53+
if event_ref.ref == form_event.get_handle():
54+
for attr in event_ref.get_attribute_list():
55+
if (attr.get_type() == "Name"): # Form specific _attribute name
56+
model.append(parent, (name_displayer.display(person), attr.get_value(),
57+
lambda db, trans, citation_handle = citation.handle, person_handle = person.handle: PrimaryNameCitation.command(db, trans, citation_handle, person_handle)))
5458

5559
def command(db, trans, citation_handle, person_handle):
5660
person = db.get_person_from_handle(person_handle)

0 commit comments

Comments
 (0)