diff --git a/CDC_Backend/APIs/companyViews.py b/CDC_Backend/APIs/companyViews.py index d721b12..cd73ce6 100644 --- a/CDC_Backend/APIs/companyViews.py +++ b/CDC_Backend/APIs/companyViews.py @@ -17,8 +17,6 @@ logger = logging.getLogger('db') RECAPTCHA_VALUE, JOB_LOCATION ]) def addPlacement(request): - logger.info("JNF filled by " + str(request.data['email'])) - logger.info(json.dumps(request.data)) try: data = request.data files = request.FILES @@ -355,7 +353,6 @@ def autoFillInf(request): CONTACT_PERSON_NAME, PHONE_NUMBER, EMAIL, RECAPTCHA_VALUE]) def addInternship(request): logger.info("INF filled by " + str(request.data['email'])) - logger.info(json.dumps(request.data)) try: data = request.data files = request.FILES @@ -419,12 +416,12 @@ def addInternship(request): else: internship.is_work_from_home = False - if ALLOWED_BATCH in data[ALLOWED_BATCH] and data[ALLOWED_BATCH] is None or json.loads(data[ALLOWED_BATCH]) == "": - raise ValueError('Allowed Batches cannot be empty') - elif ALLOWED_BATCH in data[ALLOWED_BATCH] and set(json.loads(data[ALLOWED_BATCH])).issubset(BATCHES): + if data[ALLOWED_BATCH] is None or json.loads(data[ALLOWED_BATCH]) == "": + raise ValueError('Allowed Branch cannot be empty') + elif set(json.loads(data[ALLOWED_BATCH])).issubset(BATCHES): internship.allowed_batch = json.loads(data[ALLOWED_BATCH]) else: - internship.allowed_batch = ['2021'] + raise ValueError('Allowed Batch must be a subset of ' + str(BATCHES)) if data[ALLOWED_BRANCH] is None or json.loads(data[ALLOWED_BRANCH]) == "": raise ValueError('Allowed Branch cannot be empty')