Fix type and handle missing dewar_id in sample router.
Updated puck_id type from str to int for better type consistency. Added a fallback value of -1 for pucks with missing dewar_id to prevent potential errors when querying pucks.
This commit is contained in:
@ -32,7 +32,7 @@ const SampleTracker: React.FC = () => {
|
||||
const fetchPucks = async () => {
|
||||
try {
|
||||
const data: Puck[] = await SamplesService.getAllPucksWithSamplesAndEventsSamplesPucksSamplesGet();
|
||||
console.log(data); // Log the data to inspect it
|
||||
console.log(data);
|
||||
setPucks(data);
|
||||
} catch (error) {
|
||||
console.error("Error fetching pucks", error);
|
||||
|
Reference in New Issue
Block a user