🚑 Fix nil pointer
This commit is contained in:
parent
9d64449ae4
commit
5ce552f1be
@ -154,7 +154,7 @@ func NewPost(
|
|||||||
if !realm.IsPublic {
|
if !realm.IsPublic {
|
||||||
var member models.RealmMember
|
var member models.RealmMember
|
||||||
if err := database.C.Where(&models.RealmMember{
|
if err := database.C.Where(&models.RealmMember{
|
||||||
RealmID: *realmId,
|
RealmID: realm.ID,
|
||||||
AccountID: user.ID,
|
AccountID: user.ID,
|
||||||
}).First(&member).Error; err != nil {
|
}).First(&member).Error; err != nil {
|
||||||
return post, fmt.Errorf("you aren't a part of that realm")
|
return post, fmt.Errorf("you aren't a part of that realm")
|
||||||
|
Loading…
Reference in New Issue
Block a user