Skip to content

WS-2215 Editor modal scrubbing

The editor modal was allowing empty content to persist to the database. This was because the modal actually saves the new content and if this was an empty object (by leaving the modal open or mischievous behavior) then it would wipe the contents of existing database entry.

The last time we saw this we prevented one of the endpoints from persisting empty data. This MR does that for the capability_version_files table and puts a stop-gap on the UI by not allowing an empty object from being sent to the endpoint.

The behavior is a little odd if someone actually WANTS to clear file content by submitting an empty form, but I don't anticipate that happening (some user will prove me wrong).

Merge request reports