diff --git a/backend/src/db/factories.js b/backend/src/db/factories.js index 3e164d51b..ecc792736 100644 --- a/backend/src/db/factories.js +++ b/backend/src/db/factories.js @@ -65,7 +65,6 @@ Factory.define('basicUser') name: faker.name.findName, password: '1234', role: 'user', - about: faker.lorem.paragraph, termsAndConditionsAgreedVersion: '0.0.1', termsAndConditionsAgreedAt: '2019-08-01T10:47:19.212Z', allowEmbedIframes: false, @@ -82,12 +81,28 @@ Factory.define('basicUser') Factory.define('userWithoutEmailAddress') .extend('basicUser') + .option('about', faker.lorem.paragraph) + .after(async (buildObject, options) => { + return neode.create('User', buildObject) + }) + +Factory.define('userWithAboutNull') + .extend('basicUser') + .option('about', null) + .after(async (buildObject, options) => { + return neode.create('User', buildObject) + }) + +Factory.define('userWithAboutEmpty') + .extend('basicUser') + .option('about', '') .after(async (buildObject, options) => { return neode.create('User', buildObject) }) Factory.define('user') .extend('basicUser') + .option('about', faker.lorem.paragraph) .option('email', faker.internet.exampleEmail) .option('avatar', () => Factory.build('image', { diff --git a/webapp/pages/map.vue b/webapp/pages/map.vue index afdc80e83..1a34cbda1 100644 --- a/webapp/pages/map.vue +++ b/webapp/pages/map.vue @@ -337,7 +337,7 @@ export default { id: user.id, slug: user.slug, name: user.name, - about: user.about, + about: user.about ? user.about : undefined, }, geometry: { type: 'Point', @@ -358,7 +358,7 @@ export default { id: group.id, slug: group.slug, name: group.name, - about: group.about, + about: group.about ? group.about : undefined, }, geometry: { type: 'Point', @@ -378,7 +378,7 @@ export default { id: this.currentUser.id, slug: this.currentUser.slug, name: this.currentUser.name, - about: this.currentUser.about, + about: this.currentUser.about ? this.currentUser.about : undefined, }, geometry: { type: 'Point',