Skip to content
This repository was archived by the owner on Apr 14, 2026. It is now read-only.

Commit b7e6d33

Browse files
committed
Enable users that are once again a member
1 parent 2b8256a commit b7e6d33

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

finger/management/commands/updatedb.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,11 @@ def handle(self, **options):
2121
print(f"Disable {user} (member {member})")
2222
user.is_active = False
2323
user.save()
24+
25+
print("Processing users")
26+
with transaction.atomic():
27+
for user in User.objects.filter(is_active=False):
28+
if not user.member.is_inactive():
29+
print(f"Enable {user} (member {user.member})")
30+
user.is_active = True
31+
user.save()

0 commit comments

Comments
 (0)