Merge pull request #1271 from Human-Connection/fix_missing_slug

Fix user mention menu on production data
This commit is contained in:
mattwr18 2019-08-16 09:22:46 +02:00 committed by GitHub
commit 50fc7b8580
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -94,12 +94,11 @@
}
}
*/
CALL apoc.load.json("file:${IMPORT_CHUNK_PATH_CQL_FILE}") YIELD value as user
MERGE(u:User {id: user._id["$oid"]})
ON CREATE SET
u.name = user.name,
u.slug = user.slug,
u.slug = COALESCE(user.slug, apoc.text.random(20, "[A-Za-z]")),
u.email = user.email,
u.encryptedPassword = user.password,
u.avatar = replace(user.avatar, 'https://api-alpha.human-connection.org', ''),