def check_register_enrollment(self, hackathon):
    max = int(json.loads(hackathon.basic_info)['max_enrollment'])
    if (max == 0):
        return True
    else:
        current_num = self.db.count(UserHackathonRel, (UserHackathonRel.hackathon_id == hackathon.id))
        return (max > current_num)
def check_register_enrollment(self, hackathon):
    max = int(json.loads(hackathon.basic_info)['max_enrollment'])
    if (max == 0):
        return True
    else:
        current_num = self.db.count(UserHackathonRel, (UserHackathonRel.hackathon_id == hackathon.id))
        return (max > current_num)