Update backend/src/graphql/resolver/UserResolver.ts

Co-authored-by: Ulf Gebhardt <ulf.gebhardt@webcraft-media.de>
This commit is contained in:
Moriz Wahl 2021-10-13 20:02:13 +02:00 committed by GitHub
parent 8bfec7dcf8
commit 0e75826b28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,6 +48,7 @@ export class UserResolver {
value: encode(result.data.session_id, result.data.user.public_hex),
})
const user = new User(result.data.user)
// Hack: Database Field is not validated properly and not nullable
if (user.publisherId === 0) {
user.publisherId = undefined
}