Skip to content

Commit

Permalink
Fix/Call to getMetadataValue uses _id instead of project_id (#1161)
Browse files Browse the repository at this point in the history
# feat/fix/chore: pr title

## JIRA Ticket

None

## Description

Fix a bug introduced in previous PR

## Proposed Changes

Call to getMetadataValue used the short `_id` rather than the longer
`project_id` that includes the listing id. Only in one place (getting
the QRCode field setting).

## How to Test

Load up a notebook field and notice the lack of errors.

## Checklist

- [x] I have confirmed all commits have been signed.
- [x] I have added JSDoc style comments to any new functions or classes.
- [x] Relevant documentation such as READMEs, guides, and class comments
are updated.
  • Loading branch information
luke-mcfarlane-rocketlab authored Sep 27, 2024
2 parents 5d750ca + 3697ec4 commit 5ed7c54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/src/gui/components/notebook/add_record_by_type.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default function AddRecordButtons({
RecordMetadata | undefined
>(undefined);

getMetadataValue(_id, 'showQRCodeButton').then(value => {
getMetadataValue(project_id, 'showQRCodeButton').then(value => {
setShowQRButton(value === true || value === 'true');
});

Expand Down

0 comments on commit 5ed7c54

Please sign in to comment.