updated helper_text in admin for multi selects; formatted for linter

This commit is contained in:
David Kennedy 2023-12-04 18:37:23 -05:00
parent 8ddd5e7b1f
commit 2c355353b6
No known key found for this signature in database
GPG key ID: 6528A5386E66B96B
2 changed files with 6 additions and 1 deletions

View file

@ -120,9 +120,13 @@ class ListHeaderAdmin(AuditedAdmin):
# customize the help_text for all formfields for manytomany
def formfield_for_manytomany(self, db_field, request, **kwargs):
formfield = super().formfield_for_manytomany(db_field, request, **kwargs)
formfield.help_text = formfield.help_text + " If more than one value is selected, the change/delete/view actions will be disabled."
formfield.help_text = (
formfield.help_text
+ " If more than one value is selected, the change/delete/view actions will be disabled."
)
return formfield
class UserContactInline(admin.StackedInline):
"""Edit a user's profile on the user page."""