blob: cc37db1d89125ecb11107d260debfbdc6a629c1f [file] [log] [blame]
Scott Bakeraf599eb2017-03-21 12:43:26 -07001from synchronizers.new_base.modelaccessor import *
Scott Bakerb63ea792016-08-11 10:24:48 -07002
Scott Bakeraf599eb2017-03-21 12:43:26 -07003def handle(user):
Scott Bakerb63ea792016-08-11 10:24:48 -07004 # user = User.get(user_id)
5
6 controller_users = ControllerUser.objects.filter(user=user)
7 existing_controllers = [cu.controller for cu in controller_users]
8 all_controllers = Controller.objects.all()
9 for controller in all_controllers:
10 if controller not in existing_controllers:
11 ctrl_user = ControllerUser(controller=controller, user=user)
12 ctrl_user.save()
13