Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

Commit

Permalink
fix(modèles): corrige les modèles qui peuvent avoir des objets null e…
Browse files Browse the repository at this point in the history
…n base de données (#905)
  • Loading branch information
vmaubert committed Feb 21, 2022
1 parent f80c17d commit 6feebde
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/database/models/journaux.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Journaux extends Model {
elementId: { type: 'string' },
titreId: { type: 'string' },
operation: { enum: ['create', 'update', 'delete'] },
differences: { type: 'object' }
differences: { type: ['object', 'null'] }
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/database/models/titres-activites.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class TitresActivites extends Model {
utilisateurId: { type: ['string', 'null'] },
date: { type: 'string' },
dateSaisie: { type: ['string', 'null'] },
contenu: { type: 'object' },
contenu: { type: ['object', 'null'] },
typeId: { type: 'string', maxLength: 3 },
statutId: { type: 'string', maxLength: 3 },
periodeId: { type: 'integer' },
Expand Down
2 changes: 1 addition & 1 deletion src/database/models/titres-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class TitresTypes extends Model {
typeId: { type: 'string', maxLength: 3 },
domaineId: { type: 'string', maxLength: 3 },
archive: { type: ['boolean', 'null'] },
contenuIds: { type: 'object' }
contenuIds: { type: ['object', 'null'] }
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/database/models/titres.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class Titres extends Model {
dateDebut: { type: ['string', 'null'] },
dateFin: { type: ['string', 'null'] },
dateDemande: { type: ['string', 'null'] },
contenusTitreEtapesIds: { type: 'object' },
contenusTitreEtapesIds: { type: ['object', 'null'] },
propsTitreEtapesIds: { type: 'object' },
coordonnees: {
type: ['object', 'null'],
Expand Down

0 comments on commit 6feebde

Please sign in to comment.