@parse_data
@set_database
def get_content_parents(ids=None, **kwargs):
 if ids:
  Parent = Item.alias()
  parent_values = Item.select(Parent).join(Parent, on=(Item.parent == Parent.pk)).where(Item.id.in_(ids)).distinct()
  if (parent_values is None):
   parent_values = list()
  return parent_values
 else:
  return list()

@ parse_data @ set_database def get_content_parents ( ids = None , ** kwargs ) : if ids : Parent = Item . alias ( ) parent_values = Item . select ( Parent ) . join ( Parent , on = ( Item . parent == Parent . pk ) ) . where ( Item . id . in_ ( ids ) ) . distinct ( ) if ( parent_values is None ) : parent_values = list ( ) return parent_values else : return list ( )
convenience function for returning all parent nodes of a set of content as specified by ids .