Skip to content

Commit

Permalink
fix: got both positional and keyword arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
irtazaakram committed Aug 30, 2023
1 parent 779e4b9 commit afd6a40
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lms/djangoapps/bulk_email/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ class Meta:
app_label = "bulk_email"

def __init__(self, *args, **kwargs):
kwargs['target_type'] = SEND_TO_COHORT
if not args:
kwargs['target_type'] = SEND_TO_COHORT
super().__init__(*args, **kwargs)

def __str__(self):
Expand Down Expand Up @@ -209,7 +210,8 @@ class Meta:
app_label = "bulk_email"

def __init__(self, *args, **kwargs):
kwargs['target_type'] = SEND_TO_TRACK
if not args:
kwargs['target_type'] = SEND_TO_TRACK
super().__init__(*args, **kwargs)

def __str__(self):
Expand Down

0 comments on commit afd6a40

Please sign in to comment.