<s> def handle ( site_privilege ) : <EOL> from core . models import Controller , SitePrivilege , ControllerSitePrivilege <EOL> controller_site_privileges = ControllerSitePrivilege . objects . filter ( <EOL> site_privilege = site_privilege , <EOL> ) <EOL> existing_controllers = [ sp . controller for sp in controller_site_privileges ] <EOL> all_controllers = Controller . objects . all ( ) <EOL> for controller in all_controllers : <EOL> if controller not in existing_controllers : <EOL> ctrl_site_priv = ControllerSitePrivilege ( controller = controller , site_privilege = site_privilege ) <EOL> ctrl_site_priv . save ( ) </s>
