Exemplo n.º 1
0
 def serialize(self):
     """Return object data for jsonification"""
     return {
         'id':
         self.id,
         'email':
         self.email,
         'roles': [r.name for r in self.roles],
         'first':
         self.first,
         'last':
         self.last,
         'minitial':
         self.minitial,
         'is_active':
         True if self.active else False,
         'is_expired':
         True if self.is_expired() else False,
         'added_at':
         utils.localize_est_date(self.added_at),
         'email_confirmed_at':
         utils.localize_est_datetime(self.email_confirmed_at),
         'access_expires_at':
         utils.localize_est_datetime(self.access_expires_at)
     }
Exemplo n.º 2
0
    def serialize(self):
        """Return object data for jsonification """

        return {
            'id': self.id,
            'redcap_arm': self.redcap_arm,
            'redcap_event': self.redcap_event,
            'day_offset': self.day_offset,
            'unique_event_name': self.get_unique_event_name(),
            'added_at': utils.localize_est_date(self.added_at),
        }
Exemplo n.º 3
0
 def serialize(self):
     """Return object data for jsonification"""
     return {
         'id': self.id,
         'email': self.email,
         'roles': [r.name for r in self.roles],
         'first': self.first,
         'last': self.last,
         'minitial': self.minitial,
         'is_active': True if self.active else False,
         'is_expired': True if self.is_expired() else False,
         'added_at': utils.localize_est_date(self.added_at),
         'email_confirmed_at':
             utils.localize_est_datetime(self.email_confirmed_at),
         'access_expires_at':
             utils.localize_est_datetime(self.access_expires_at)
     }