diff --git a/backend/pkg/db/types/project.go b/backend/pkg/db/types/project.go index 9a267d0c0..74ec90c47 100644 --- a/backend/pkg/db/types/project.go +++ b/backend/pkg/db/types/project.go @@ -1,5 +1,7 @@ package types +import "log" + type Project struct { ProjectID uint32 ProjectKey string @@ -19,6 +21,10 @@ type Project struct { func (p *Project) GetMetadataNo(key string) uint { + if p == nil { + log.Printf("GetMetadataNo: Project is nil") + return 0 + } if p.Metadata1 != nil && *(p.Metadata1) == key { return 1 }