Skip to content

Commit

Permalink
Merge pull request #725 from openedx/eahmadjaved/ENT-9615-2
Browse files Browse the repository at this point in the history
refactor: remove the old fields in user agreement model
  • Loading branch information
jajjibhai008 authored Oct 23, 2024
2 parents 7196f38 + 194c8c1 commit eac593b
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 26 deletions.
2 changes: 0 additions & 2 deletions license_manager/apps/api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,6 @@ class Meta:
'expired_subscription_modal_messaging',
'button_label_in_modal',
'url_for_button_in_modal',
'hyper_link_text_for_expired_modal',
'url_for_expired_modal',
]

def get_subscription_for_auto_applied_licenses(self, obj):
Expand Down
2 changes: 0 additions & 2 deletions license_manager/apps/subscriptions/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,6 @@ class CustomerAgreementAdmin(admin.ModelAdmin):
'expired_subscription_modal_messaging',
'button_label_in_modal',
'url_for_button_in_modal',
'hyper_link_text_for_expired_modal',
'url_for_expired_modal'
)
custom_fields = ('subscription_for_auto_applied_licenses',)

Expand Down
22 changes: 0 additions & 22 deletions license_manager/apps/subscriptions/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,24 +169,6 @@ class CustomerAgreement(TimeStampedModel):
)
)

hyper_link_text_for_expired_modal = models.CharField(
max_length=255,
blank=True,
null=True,
help_text=_(
"The display text for the link that will be embedded at the end of the custom expiration modal."
)
)

url_for_expired_modal = models.CharField(
max_length=512,
blank=True,
null=True,
help_text=_(
"The underlying url that will be embedded as a hyperlink at the end of the custom expiration modal."
)
)

button_label_in_modal = models.CharField(
max_length=255,
blank=True,
Expand Down Expand Up @@ -281,8 +263,6 @@ def clean(self):
"expired_subscription_modal_messaging": error_message,
"button_label_in_modal": error_message,
"url_for_button_in_modal": error_message,
"hyper_link_text_for_expired_modal": error_message,
"url_for_expired_modal": error_message
}

# Check if any required fields are missing
Expand All @@ -297,8 +277,6 @@ def clean(self):
"expired_subscription_modal_messaging",
"button_label_in_modal",
"url_for_button_in_modal",
"hyper_link_text_for_expired_modal",
"url_for_expired_modal",
]
if any(getattr(self, field) for field in fields_to_check):
error_msg = "This field must be blank if 'Has Custom License Expiration Messaging' is unchecked."
Expand Down

0 comments on commit eac593b

Please sign in to comment.