Prevent null error when parent meeting does not exist
This commit is contained in:
parent
d24cdfde6f
commit
bc7c3143ba
@ -1156,6 +1156,11 @@ public class ParamsProcessorUtil {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean parentMeetingExists(String parentMeetingId) {
|
||||
Meeting meeting = ServiceUtils.findMeetingFromMeetingID(parentMeetingId);
|
||||
return meeting != null;
|
||||
}
|
||||
|
||||
/*************************************************
|
||||
* Setters
|
||||
************************************************/
|
||||
|
@ -127,10 +127,16 @@ class ApiController {
|
||||
return
|
||||
}
|
||||
|
||||
if(params.isBreakout == "true" && !params.parentMeetingID) {
|
||||
if(params.isBreakout == "true") {
|
||||
if(!params.parentMeetingID) {
|
||||
invalid("parentMeetingIDMissing", "No parent meeting ID was provided for the breakout room")
|
||||
return
|
||||
}
|
||||
if(!paramsProcessorUtil.parentMeetingExists(params.parentMeetingID)) {
|
||||
invalid("parentMeetingDoesNotExist", "No parent meeting exists for the breakout room")
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// Ensure unique TelVoice. Uniqueness is not guaranteed by paramsProcessorUtil.
|
||||
if (!params.voiceBridge) {
|
||||
|
Loading…
Reference in New Issue
Block a user