def create_registration(self, hackathon, args):
    (state, return_info) = self.validate_created_args(hackathon, args)
    if (not state):
        return return_info
    try:
        args['status'] = ((hackathon.is_auto_approve() and RGStatus.AUTO_PASSED) or RGStatus.UNAUDIT)
        return self.db.add_object_kwargs(UserHackathonRel, **args).dic()
    except Exception as e:
        self.log.error(e)
        return internal_server_error('fail to create register')
def create_registration(self, hackathon, args):
    (state, return_info) = self.validate_created_args(hackathon, args)
    if (not state):
        return return_info
    try:
        args['status'] = ((hackathon.is_auto_approve() and RGStatus.AUTO_PASSED) or RGStatus.UNAUDIT)
        return self.db.add_object_kwargs(UserHackathonRel, **args).dic()
    except Exception as e:
        self.log.error(e)
        return internal_server_error('fail to create register')