Revision 61a1b2d2 snf-astakos-app/astakos/im/management/commands/astakos-qh-sync.py

b/snf-astakos-app/astakos/im/management/commands/astakos-qh-sync.py
45 45

  
46 46
    def handle_noargs(self, **options):
47 47
        try:
48
            register_resources(Resource.objects.all())
49
            register_users(AstakosUser.objects.all())
48
            resources = list(Resource.objects.all())
49
	    print("Registering resources")
50
            register_resources(resources)
51
	    print("Registering users")
52
            users = list(AstakosUser.objects.verified().all())
53
            if users:
54
                register_users(users)
55
            else:
56
                print(" -> No verified users found.")
50 57
        except BaseException, e:
51 58
            logger.exception(e)
52 59
            raise CommandError("Syncing failed.")
60

  

Also available in: Unified diff