query data StatusUpdate gql WHERE id id items query fetch if not items

1
2
3
4
5
6
7
8
query = data.StatusUpdate.gql('WHERE id = :1', id)
items = query.fetch(1)
if not items:
return None
item = items[0]
if item.from_friend.user != user:
return None
return item