🐛 Fix filter with realm
This commit is contained in:
parent
a15a0d1c11
commit
be1beb713c
@ -156,7 +156,7 @@ func FilterPostWithUserContext(tx *gorm.DB, user *authm.Account, withRealm bool)
|
||||
}
|
||||
if !withRealm {
|
||||
if len(realmList) > 0 {
|
||||
tx = tx.Where("realm_id IN ?", realmList)
|
||||
tx = tx.Where("realm_id IN ? OR realm_id IS NULL", realmList)
|
||||
} else {
|
||||
tx = tx.Where("realm_id IS NULL")
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user