def _get_attach_form(self): form = AttachChatroomForm() form.chatroom.query = Chatroom.find(Chatroom.created_by_user == session.user, ~Chatroom.events.any(ChatroomEventAssociation.event_id == self.event_id)) return form
def has_data(self): return Chatroom.find().count()