Skip to content

Commit 7abf90f

Browse files
authored
Refactor docstring for channel_search_display method
Updated the docstring for channel_search_display to be more concise.
1 parent cb80c77 commit 7abf90f

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

backend/apps/owasp/admin/entity_channel.py

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -62,20 +62,8 @@ class EntityChannelAdmin(admin.ModelAdmin):
6262
)
6363

6464
def channel_search_display(self, obj):
65-
"""
66-
Return a human-readable channel name for display in the list view.
67-
68-
If the EntityChannel references a Conversation (channel_type.model == "conversation")
69-
and a Conversation with the stored `channel_id` exists, returns the channel name
70-
prefixed with `#`. If the referenced Conversation cannot be found, returns a
71-
"not found" message. If no channel information is available, returns "-".
72-
73-
Args:
74-
obj (EntityChannel): The EntityChannel instance.
75-
76-
Returns:
77-
str: The display string for the channel column.
78-
"""
65+
"""Return the display name of the related channel for admin lists."""
66+
7967
if obj.channel_id and obj.channel_type:
8068
try:
8169
if obj.channel_type.model == "conversation":

0 commit comments

Comments
 (0)