Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/staging' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
daneryl committed Oct 16, 2024
2 parents 5b0e380 + a3a7db9 commit 8c896fb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/api/entities.v2/model/Entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export class Entity {
if (property.type === 'text' || property.type === 'markdown') {
const isTitleProperty = property instanceof CommonProperty && property.name === 'title';
if (isTitleProperty) return this.title;
return this.metadata[property.name][0].value as string;
return this.metadata[property.name]?.[0]?.value as string;
}

throw new Error('types other than string/markdown are not implemented yet');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@ const fixtures: DBFixture = {
factory.template('template1', [
factory.property('text1'),
factory.property('text2', 'markdown'),
factory.property('text3'),
factory.property('empty_text'),
]),
],
entities: [
...factory.entityInMultipleLanguages(['en', 'es', 'pt'], 'entity1', 'template1', {
text1: [{ value: 'original text1' }],
text2: [{ value: 'markdown text' }],
text3: [],
empty_text: [{ value: '' }],
}),
],
Expand All @@ -47,6 +49,7 @@ const fixtures: DBFixture = {
properties: [
factory.idString('text1'),
factory.idString('text2'),
factory.idString('text3'),
factory.idString('empty_text'),
],
commonProperties: [factory.commonPropertiesTitleId('template1')],
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "uwazi",
"version": "1.189.0-rc4",
"version": "1.189.0-rc5",
"description": "Uwazi is a free, open-source solution for organising, analysing and publishing your documents.",
"keywords": [
"react"
Expand Down

0 comments on commit 8c896fb

Please sign in to comment.