@set_database
def get_assessment_item_data(assessment_item_id=None, **kwargs):
 try:
  assessment_item = AssessmentItem.get((AssessmentItem.id == assessment_item_id))
  return model_to_dict(assessment_item)
 except OperationalError:
  return {}

@ set_database def get_assessment_item_data ( assessment_item_id = None , ** kwargs ) : try : assessment_item = AssessmentItem . get ( ( AssessmentItem . id == assessment_item_id ) ) return model_to_dict ( assessment_item ) except OperationalError : return { }
wrapper function to return assessment_item from database as a dictionary .