fix problem with fetching project with out logourl

This commit is contained in:
einhornimmond 2025-03-04 16:42:42 +01:00
parent b79ea80da1
commit 23228676a2
2 changed files with 3 additions and 2 deletions

View File

@ -36,7 +36,7 @@ export class ProjectBrandingResolver {
async projectBrandingBanner(@Arg('alias', () => String) alias: string): Promise<string | null> {
const projectBrandingEntity = await DbProjectBranding.findOne({
where: { alias },
select: { logoUrl: true },
select: { id: true, logoUrl: true },
})
if (!projectBrandingEntity) {
throw new LogError(`Project Branding with alias: ${alias} not found`)

View File

@ -141,8 +141,9 @@ onBeforeMount(() => {
store.commit('project', null)
})
// put project value into store, if projectBrandingBanner query don't throw an error, so project exists
watchEffect(() => {
if (projectBannerResult.value?.projectBrandingBanner) {
if (projectBannerResult.value) {
store.commit('project', projectValue.value)
}
})