Skip to content

Commit

Permalink
fix: correct params for expiration_date (#147)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilee2u authored Dec 18, 2024
1 parent 555f4be commit cbe296d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions learning_assistant/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ class LearningAssistantAuditTrialAdmin(admin.ModelAdmin):
"""

@admin.display(description="Expiration Date")
def expiration_date(self, obj):
def expiration_date(self):
"""
Generate the expiration date for the LearningAssistantAuditTrial based on the start_date.
"""
return obj.start_date + timedelta(days=settings.LEARNING_ASSISTANT_AUDIT_TRIAL_LENGTH_DAYS)
# pylint: disable-next=no-member
return self.start_date + timedelta(days=settings.LEARNING_ASSISTANT_AUDIT_TRIAL_LENGTH_DAYS)

list_display = ('user', 'start_date', expiration_date)
raw_id_fields = ('user',)
Expand Down

0 comments on commit cbe296d

Please sign in to comment.