diff --git a/sso/cron.py b/sso/cron.py index b9a3bfa..4ba3180 100644 --- a/sso/cron.py +++ b/sso/cron.py @@ -71,7 +71,7 @@ class UpdateServiceGroups(): #try: ret = api.update_groups(servacc.service_uid, servacc.user.groups.all()) if not ret: - if not api.check_user(servacc.service_uid): + if not api.check_uid(servacc.service_uid): self._logger.error('%s not setup on %s, deleting ServiceAccount record' % (servacc.service_uid, serv)) servacc.delete() #except: diff --git a/sso/services/__init__.py b/sso/services/__init__.py index 3aa08c4..5cbe982 100644 --- a/sso/services/__init__.py +++ b/sso/services/__init__.py @@ -39,6 +39,10 @@ class BaseService(): """ Check if the username exists """ return False + def check_uid(self, uid): + """ Check if a UID exists """ + return self.check_user(uid) + def delete_user(self, uid): """ Delete a user by uid """ return True