Improved post parent check

This commit is contained in:
Eduard Urbach 2022-06-29 11:53:52 +09:00
parent ce374fb9c0
commit 1a65f8dcdf
Signed by: akyoto
GPG Key ID: C874F672B1AF20C0

View File

@ -9,7 +9,13 @@ func main() {
defer arn.Node.Close()
for post := range arn.StreamPosts() {
if post.Parent() == nil {
if post.ParentID == "" {
continue
}
obj, _ := arn.DB.Get(post.ParentType, post.ParentID)
if obj == nil {
color.Yellow(post.ID)
color.Red(post.Text)
}