Skip to content

Commit

Permalink
Added condition to credit class operational scripts so it doesn't thr…
Browse files Browse the repository at this point in the history
…ow an error if the records have already been created (#266)
  • Loading branch information
amichard authored Jul 28, 2020
1 parent 3ddab66 commit 0a49696
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions backend/api/fixtures/operational/0006_add_credit_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,15 @@ def check_run_preconditions(self):
def run(self):
CreditClass.objects.get_or_create(
credit_class='A',
effective_date="2018-01-01"
defaults={
'effective_date': "2018-01-01"
}
)
CreditClass.objects.get_or_create(
credit_class='B',
effective_date="2018-01-01"
defaults={
'effective_date': "2018-01-01"
}
)


Expand Down

0 comments on commit 0a49696

Please sign in to comment.