Fix insert-mobility, the file was overwritten by null. Anys if you can test it, I can't add anything in database (idk why)
This commit is contained in:
@@ -6,6 +6,7 @@ COPY . .
|
||||
RUN deno cache main.ts --allow-import main.ts
|
||||
RUN deno task build
|
||||
|
||||
|
||||
EXPOSE 80
|
||||
EXPOSE 443
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ export const handler: Handlers = {
|
||||
destinationCountry = excluded.destinationCountry,
|
||||
destinationName = excluded.destinationName,
|
||||
mobilityStatus = excluded.mobilityStatus,
|
||||
attestationFile = excluded.attestationFile`
|
||||
attestationFile = COALESCE(excluded.attestationFile, mobility.attestationFile)`
|
||||
);
|
||||
|
||||
for (const mobility of dataEntries) {
|
||||
@@ -105,7 +105,7 @@ export const handler: Handlers = {
|
||||
calculatedWeeksCount = Math.floor(differenceInDays / 7);
|
||||
}
|
||||
}
|
||||
const attestationFile = fileMap[studentId] || null;
|
||||
const attestationFile = fileMap[studentId] ?? null;
|
||||
|
||||
console.log(`Inserting/Updating mobility for studentId: ${studentId}`);
|
||||
insertQuery.run(
|
||||
|
||||
Reference in New Issue
Block a user