diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index c2c7670..7537657 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,9 +4,8 @@
-
+
-
@@ -117,7 +116,6 @@
-
@@ -142,7 +140,8 @@
-
+
+
true
diff --git a/pkg/internal/services/attachments.go b/pkg/internal/services/attachments.go
index 3557b35..ae98841 100644
--- a/pkg/internal/services/attachments.go
+++ b/pkg/internal/services/attachments.go
@@ -187,7 +187,7 @@ func TryLinkAttachment(tx *gorm.DB, og models.Attachment, hash string) (bool, er
return false, err
}
- if prev.PoolID != nil && og.PoolID != nil && prev.PoolID != og.PoolID {
+ if prev.PoolID != nil && og.PoolID != nil && prev.PoolID != og.PoolID && prev.Pool != nil && og.Pool != nil {
if !prev.Pool.Config.Data().AllowCrossPoolEgress || !og.Pool.Config.Data().AllowCrossPoolIngress {
// Pool config doesn't allow reference
return false, nil