Removed validation for published call to restrict updates on the call
This commit is contained in:
@@ -442,7 +442,7 @@ public class CallDao {
|
||||
|
||||
|
||||
public CallResponse createCallStep2(CallEntity callEntity, CreateCallRequestStep2 createCallRequest, UserEntity user) {
|
||||
validateUpdate(callEntity);
|
||||
// validateUpdate(callEntity);
|
||||
setIfUpdated(callEntity::getThreshold, callEntity::setThreshold, createCallRequest.getThreshold());
|
||||
callRepository.save(callEntity);
|
||||
convertToEvaluationCriteriaEntities(createCallRequest.getCriteria(), callEntity, LookUpDataTypeEnum.EVALUATION_CRITERIA);
|
||||
@@ -502,13 +502,6 @@ public class CallDao {
|
||||
}
|
||||
|
||||
public CallResponse updateCallStep1(CallEntity callEntity, UpdateCallRequestStep1 updateCallRequest, UserEntity userEntity) {
|
||||
if(Boolean.TRUE.equals(callEntity.getStatus().equals(CallStatusEnum.PUBLISH.getValue()))) {
|
||||
try {
|
||||
Utils.retainOnlySpecificFields(updateCallRequest, Collections.singletonList("faq"));
|
||||
} catch (IllegalAccessException e) {
|
||||
throw new CustomValidationException(Status.BAD_REQUEST,Translator.toLocale(GepafinConstant.FAILED_RETAIN_FIELD));
|
||||
}
|
||||
}
|
||||
isValidDateRange(updateCallRequest, callEntity);
|
||||
setIfUpdated(callEntity::getName, callEntity::setName, updateCallRequest.getName());
|
||||
setIfUpdated(callEntity::getDescriptionShort, callEntity::setDescriptionShort,
|
||||
|
||||
Reference in New Issue
Block a user