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:
GotthardG
2025-01-10 13:39:10 +01:00
parent fa99e3fa63
commit 19ef20e6b0
3 changed files with 33 additions and 24 deletions

View File

@ -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);