Skip to content

Commit ea132ad

Browse files
committed
fix: 어드민에서 알림 모델들 관련한 목록의 제목이 이상한 문제 수정
1 parent 08f9d0b commit ea132ad

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

app/notification/models/base.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ class Meta:
7676
),
7777
]
7878

79+
def __str__(self) -> str:
80+
return f"[{self.code}] {self.title}"
81+
7982
@classmethod
8083
def _to_dtl(cls, source: str) -> str:
8184
return source
@@ -153,6 +156,9 @@ class NotificationHistoryBase(BaseAbstractModel):
153156
class Meta:
154157
abstract = True
155158

159+
def __str__(self) -> str:
160+
return f"{self.template_code or '-'} by {self.created_by}"
161+
156162
@property
157163
def template_code(self) -> str:
158164
return self.template.code if self.template_id else ""
@@ -212,6 +218,9 @@ class Meta:
212218
),
213219
]
214220

221+
def __str__(self) -> str:
222+
return f"{self.recipient} ({self.get_status_display()})"
223+
215224
def _parsed_template_data(self) -> Any:
216225
try:
217226
return json_loads(self.history.template_data)

0 commit comments

Comments
 (0)