blob: cc37db1d89125ecb11107d260debfbdc6a629c1f [file] [log] [blame]
from synchronizers.new_base.modelaccessor import *
def handle(user):
# user = User.get(user_id)
controller_users = ControllerUser.objects.filter(user=user)
existing_controllers = [cu.controller for cu in controller_users]
all_controllers = Controller.objects.all()
for controller in all_controllers:
if controller not in existing_controllers:
ctrl_user = ControllerUser(controller=controller, user=user)
ctrl_user.save()