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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean parentMeetingExists(String parentMeetingId) {
|
||||||
|
Meeting meeting = ServiceUtils.findMeetingFromMeetingID(parentMeetingId);
|
||||||
|
return meeting != null;
|
||||||
|
}
|
||||||
|
|
||||||
/*************************************************
|
/*************************************************
|
||||||
* Setters
|
* Setters
|
||||||
************************************************/
|
************************************************/
|
||||||
|
@ -127,9 +127,15 @@ class ApiController {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if(params.isBreakout == "true" && !params.parentMeetingID) {
|
if(params.isBreakout == "true") {
|
||||||
invalid("parentMeetingIDMissing", "No parent meeting ID was provided for the breakout room")
|
if(!params.parentMeetingID) {
|
||||||
return
|
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.
|
// Ensure unique TelVoice. Uniqueness is not guaranteed by paramsProcessorUtil.
|
||||||
|
Loading…
Reference in New Issue
Block a user