def get_trigger_type_db(ref):
 try:
  return TriggerType.get_by_ref(ref)
 except StackStormDBObjectNotFoundError as e:
  LOG.debug(('Database lookup for ref="%s" resulted ' + 'in exception : %s.'), ref, e, exc_info=True)
 return None

def get_trigger_type_db ( ref ) : try : return TriggerType . get_by_ref ( ref ) except StackStormDBObjectNotFoundError as e : LOG . debug ( ( 'Database lookup for ref="%s" resulted ' + 'in exception : %s.' ) , ref , e , exc_info = True ) return None
returns the trigger type object from db given a string ref .