Skip to content

Commit

Permalink
Merge pull request #33132 from openedx/fix-got-both-positional-and-ke…
Browse files Browse the repository at this point in the history
…yword-arguments-for-field

[Django 4.2]: Fix: got both positional and keyword arguments for field
  • Loading branch information
irtazaakram authored Sep 13, 2023
2 parents 4191a37 + afd6a40 commit 71d99c8
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 71d99c8

Please sign in to comment.