Пример #1
0
def validate_context_type_on_dissociation(line_extension):
    context = context_dao.get_by_extension_id(line_extension.extension_id)
    if context.type == ContextType.internal:
        ule_helper.validate_no_device(line_extension.line_id)
Пример #2
0
def validate_dissociation(user_line):
    _validate_user_id(user_line)
    _validate_line_id(user_line)
    _validate_user_has_line(user_line)
    _is_allowed_to_dissociate(user_line)
    ule_helper.validate_no_device(user_line.line_id)