Skip to content

Commit

Permalink
... this works locally v2
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonLovesDoggo committed Jan 4, 2024
1 parent 0616984 commit 78a1519
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/management/commands/migrate_staff.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class Command(BaseCommand):
help = "Populate staff members based on METROPOLIS_STAFFS and bio settings."

def handle(self, *args, **options):
self.stdout.write(self.style.INFO(StaffMember.objects.all().count()))
try:
for position, user_ids in settings.METROPOLIS_STAFFS.items():
for user_id in user_ids:
Expand All @@ -34,10 +35,10 @@ def handle(self, *args, **options):
position
]
staff_member.save()
except IntegrityError:
except IntegrityError as e:
self.stdout.write(
self.style.WARNING(
f"StaffMember for user {user_id} already exists"
f"StaffMember for user {user_id} already exists: " + str(e)
)
)

Expand Down

0 comments on commit 78a1519

Please sign in to comment.