Fix a bug with setting empty captions for file attachments.

Review Request #13335 — Created Oct. 12, 2023 and submitted

Information

Review Board
release-6.x

Reviewers

We had a bug with setting empty captions for file attachments. After setting
an empty caption, the published caption (if it exists) would be displayed
instead of the empty caption. This was due to the conditions that we used to
serialize captions for draft file attachments. This change fixes that up, and
adds unit tests for this case. While this was a backend problem, I've also
added a JS test for saving an empty caption just for good measure.

  • Tested setting empty captions on new drafts, new revisions, and published
    file attachments.
  • Ran unit and JS tests.
Summary ID
Fix bug with setting empty captions for file attachments.
41e10743235fdd96fa446e0673e7103a6da34ec4
chipx86
  1. Ship It!
  2. 
      
maubin
Review request changed
Status:
Completed
Change Summary:
Pushed to release-6.x (c57a0a8)