mirror of
https://github.com/fergalmoran/dss.api.git
synced 2025-12-22 09:18:13 +00:00
16 lines
431 B
Python
16 lines
431 B
Python
import uuid
|
|
|
|
from django.core.management.base import NoArgsCommand
|
|
|
|
from spa.models import UserProfile
|
|
|
|
|
|
class Command(NoArgsCommand):
|
|
def handle_noargs(self, **options):
|
|
try:
|
|
users = UserProfile.objects.exclude(uid__isnull=False)
|
|
for user in users:
|
|
user.uid = uuid.uuid4()
|
|
user.save()
|
|
except Exception as ex:
|
|
print("Debug exception: %s" % ex) |