def update_registration(self, args):
    self.log.debug(('update_registration: %r' % args))
    try:
        id = args['id']
        register = self.get_registration_by_id(id)
        if (register is None):
            return not_found('registration not found')
        self.log.debug('update a existed register')
        update_items = dict((dict(args).viewitems() - register.dic().viewitems()))
        if ('create_time' in update_items):
            update_items.pop('create_time')
        update_items['update_time'] = self.util.get_now()
        self.db.update_object(register, **update_items)
        return register.dic()
    except Exception as e:
        self.log.error(e)
        return internal_server_error('fail to  update register')
def update_registration(self, args):
    self.log.debug(('update_registration: %r' % args))
    try:
        id = args['id']
        register = self.get_registration_by_id(id)
        if (register is None):
            return not_found('registration not found')
        self.log.debug('update a existed register')
        update_items = dict((dict(args).viewitems() - register.dic().viewitems()))
        if ('create_time' in update_items):
            update_items.pop('create_time')
        update_items['update_time'] = self.util.get_now()
        self.db.update_object(register, **update_items)
        return register.dic()
    except Exception as e:
        self.log.error(e)
        return internal_server_error('fail to  update register')