The way we were keeping the document id completely broke down with a
recent change in Ideascube:
In addition, this was wrong anyway, because we were using a custom
form to keep the attribute when creating the message, but not when
editing it. And publishing a message means editing it, so de facto those
attributes were all always lost.
So we need a custom model, to keep track of the linked media. This
should probably be an N-to-N relationship directly in Ideascube, but
this is not the time.
This also makes the cleaning command much nicer!