mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Fix user mention menu on production data
Apparently some of our users in production have no slug, this will assign an (hopefully unique) random slug to them.
This commit is contained in:
parent
2cb8719d5f
commit
d3b256e99e
@ -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', ''),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user