From 194c8c131b02353c95dcadc01a00d28833f3a4c6 Mon Sep 17 00:00:00 2001 From: jajjibhai008 Date: Tue, 22 Oct 2024 15:40:52 +0500 Subject: [PATCH] refactor: remove the old fields in user agreement model --- license_manager/apps/api/serializers.py | 2 -- license_manager/apps/subscriptions/admin.py | 2 -- license_manager/apps/subscriptions/models.py | 22 -------------------- 3 files changed, 26 deletions(-) diff --git a/license_manager/apps/api/serializers.py b/license_manager/apps/api/serializers.py index 5123f0bf..c6795d21 100644 --- a/license_manager/apps/api/serializers.py +++ b/license_manager/apps/api/serializers.py @@ -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): diff --git a/license_manager/apps/subscriptions/admin.py b/license_manager/apps/subscriptions/admin.py index 522a28a1..17d64662 100644 --- a/license_manager/apps/subscriptions/admin.py +++ b/license_manager/apps/subscriptions/admin.py @@ -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',) diff --git a/license_manager/apps/subscriptions/models.py b/license_manager/apps/subscriptions/models.py index e786e8af..47939af6 100644 --- a/license_manager/apps/subscriptions/models.py +++ b/license_manager/apps/subscriptions/models.py @@ -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, @@ -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 @@ -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."