unsetDomainOnDeactivation(domain, event)

Documentation String

Unset the permission id up registration deactivation.

Let's see how this notifier can be used. First we need to create an event using the permission instance and a registration stub:

>>> class Registration:
...     def __init__(self, obj, name):
...         self.component = obj
... = name
>>> domain1 = TranslationDomain()
>>> domain1.domain = 'domain1'
>>> import zope.component.interfaces
>>> event = zope.component.interfaces.Unregistered(
...     Registration(domain1, 'domain1'))

Now we pass the event into this function, and the id of the role should be set to '<domain not activated>'.

>>> unsetDomainOnDeactivation(domain1, event)
>>> domain1.domain
'<domain not activated>'