Allow undated reconstructed events

This commit is contained in:
2026-08-14 19:57:22 +02:00
parent 703b9652c9
commit d99deb3c06
10 changed files with 60 additions and 17 deletions
+1 -1
View File
@@ -247,7 +247,7 @@ export function createLevelRepository(pool: Pool, editingEnabled: boolean): Leve
if (canonicalType === 'note') await client.query('INSERT INTO osint.note_exhibits (exhibit_id,title,note_text) VALUES ($1,$2,$3)', [exhibit.id, exhibit.title, exhibit.content])
if (canonicalType === 'event') await client.query(
'INSERT INTO osint.event_exhibits (exhibit_id,title,narrative_text,occurred_at) VALUES ($1,$2,$3,$4)',
[exhibit.id, exhibit.title, exhibit.content, timestamp(exhibit.eventDate) || new Date().toISOString()])
[exhibit.id, exhibit.title, exhibit.content, timestamp(exhibit.eventDate)])
if (canonicalType === 'party') {
const partyKind: PartyKind = exhibit.partyKind === 'organization' ? 'organization' : 'person'
await client.query('INSERT INTO osint.party_exhibits (exhibit_id,party_kind,display_name,summary) VALUES ($1,$2,$3,$4)',