Correct the wrong usage of AccessControl.ZopeGuards.ContainerAssertions.
wrong: ContainerAssertions(datetime.datetime) = 1 right: ContainerAssertions(type(datetime.datetime)) = 1 ContainerAssertions expects that the given parameter is a type. Furthermore, allow_type(<type>) is the higher function which doing the same thing with asserting the given parameter data type. The conclusion is that we should use allow_type when we want to allow classes inside a built-in module: allow_type(type(datetime.datetime))
Showing
Please register or sign in to comment