We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6b29c18 commit 29a181bCopy full SHA for 29a181b
src/apphandler.js
@@ -998,17 +998,15 @@ export class AppHandler {
998
}
999
const lecturescol = this.mongo.collection('lectures')
1000
// date
1001
- if (!details?.ipynbs) {
1002
- await lecturescol.updateOne(
1003
- { uuid: lectureuuid },
1004
- {
1005
- $addToSet: {
1006
- ipynbs: { id: pynb.id }
1007
- },
1008
- $currentDate: { lastaccess: true }
1009
- }
1010
- )
1011
+ await lecturescol.updateOne(
+ { uuid: lectureuuid, 'ipynbs.id': { $ne: pynb.id } },
+ {
+ $addToSet: {
+ ipynbs: { id: pynb.id }
+ },
+ $currentDate: { lastaccess: true }
+ }
+ )
1012
await lecturescol.updateOne(
1013
{ uuid: lectureuuid },
1014
{
0 commit comments