Skip to content

Commit

Permalink
checkin
Browse files Browse the repository at this point in the history
  • Loading branch information
jctanner committed Oct 5, 2023
1 parent 38f2061 commit ad30f64
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions dev/scripts.community/cleanup_namespaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ def strip_number_from_string(input_string):


def do_cleanup():

resp = input("Are you sure you want to run this? ")
print(resp)

# make a list of all namespace names
ns_names = []
for ns_name in Namespace.objects.values_list('name', flat=True):
Expand Down Expand Up @@ -66,13 +70,15 @@ def do_cleanup():
owners = None
legacy_count = None

counter += 1
# is there a matching user for this namespace ...?
found_user = User.objects.filter(username=ns_key).first()
if not found_user:
continue

counter += 1
print('-' * 100)
print(f'{counter}. {ns_key}')

# is there a matching user for this namespace ...?
found_user = User.objects.filter(username=ns_key).first()
print('')
print(f'\tuser: {found_user}')

Expand Down

0 comments on commit ad30f64

Please sign in to comment.