From c359b4636ef13939bff7e710bd18663fa278210c Mon Sep 17 00:00:00 2001 From: soxx Date: Fri, 21 Jun 2024 23:18:33 +0200 Subject: [PATCH] fix(postgres): prefilled posts with empty Signed-off-by: soxx --- internal/postgres/post.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/postgres/post.go b/internal/postgres/post.go index d8158d9..c5983dc 100644 --- a/internal/postgres/post.go +++ b/internal/postgres/post.go @@ -41,7 +41,7 @@ func CheckIfAnthrovePostNodeExistsByAnthroveID(ctx context.Context, db *gorm.DB, } func CheckIfAnthrovePostNodeExistsBySourceURL(ctx context.Context, db *gorm.DB, sourceURL string) (*graphModels.AnthrovePost, bool, error) { - var post pgModels.Post + post := pgModels.Post{} err := db.WithContext(ctx).Model(&pgModels.Post{}).InnerJoins("References", db.Where("url = ?", sourceURL)).First(&post).Error if err != nil {