Upgrade allow adding image in ticket details page comment section

This commit is contained in:
2026-03-30 11:14:35 -04:00
parent 2beef382b7
commit bf29ccb287
13 changed files with 419 additions and 26 deletions
+4 -2
View File
@@ -88,8 +88,10 @@ def get_comments(ticket_id):
'can_delete' : current_user.is_it_staff or c.author_id == current_user.id,
'attachments': [
{
'id' : a.id,
'filename': a.filename,
'id' : a.id,
'filename' : a.filename,
'mime_type': a.mime_type or '',
'is_image' : (a.mime_type or '').startswith('image/'),
}
for a in c.attachments.all()
],