def _changed_packages_activity_query():
 import ckan.model as model
 q = model.Session.query(model.Activity)
 q = q.filter(model.Activity.activity_type.endswith('package'))
 return q

def _changed_packages_activity_query ( ) : import ckan . model as model q = model . Session . query ( model . Activity ) q = q . filter ( model . Activity . activity_type . endswith ( 'package' ) ) return q
return an sqlalchemyu query for all changed package activities .