Skip to content

Commit

Permalink
Fix #377: Fix internal server error on multiview.py with invalid reco…
Browse files Browse the repository at this point in the history
…rd ID (#397)
  • Loading branch information
gimite committed Jul 9, 2018
1 parent 802cdae commit 8278e01
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/multiview.py
Expand Up @@ -41,6 +41,11 @@ def get(self):
if not id:
break
p = Person.get(self.repo, id)
if not p:
return self.error(
404,
_("This person's entry does not exist or has been "
"deleted."))
sanitize_urls(p)

for prop in COMPARE_FIELDS:
Expand Down Expand Up @@ -103,7 +108,7 @@ def post(self):
for other_id in ids - set([person_id]):
note = Note.create_original(
self.repo,
entry_date=get_utcnow(),
entry_date=get_utcnow(),
person_record_id=person_id,
linked_person_record_id=other_id,
text=self.params.text,
Expand Down

0 comments on commit 8278e01

Please sign in to comment.