Delete old awards, add new awards
This commit is contained in:
parent
e08bd8508a
commit
acd30fb457
|
|
@ -26,6 +26,7 @@ class Command(BaseCommand):
|
||||||
|
|
||||||
def handle(self, *args, **kwargs):
|
def handle(self, *args, **kwargs):
|
||||||
objects =[]
|
objects =[]
|
||||||
|
Award.objects.all().delete()
|
||||||
for a in tqdm(self.award_sql(), desc='Add award to profile'):
|
for a in tqdm(self.award_sql(), desc='Add award to profile'):
|
||||||
profiles = Employee.objects.filter(old_id=a.profile_id)
|
profiles = Employee.objects.filter(old_id=a.profile_id)
|
||||||
type = AwardType.objects.filter(old_id=a.award_type)
|
type = AwardType.objects.filter(old_id=a.award_type)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user