Skip to content

Commit

Permalink
Add observer_key to records API context
Browse files Browse the repository at this point in the history
Adds the observer_key data (if exists) to the context in records/api to display a verified access key.
  • Loading branch information
ItIsJordan committed Jan 14, 2025
1 parent 23ff1e7 commit c6bb6c7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hepdata/modules/records/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,9 @@ def render_record(recid, record, version, output_format, light_mode=False, obser
ctx['related_recids'] = get_record_data_list(hepdata_submission, "related")
ctx['related_to_this_recids'] = get_record_data_list(hepdata_submission, "related_to_this")

if key_verified:
ctx['observer_key'] = observer_key

increment(recid)

if output_format == 'html' or output_format == 'json_ld':
Expand Down

0 comments on commit c6bb6c7

Please sign in to comment.