Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove the old fields in user agreement model #725

Merged
merged 1 commit into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading