1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-21 14:19:43 +02:00

completed red-line links

This commit is contained in:
Harvey Kandola 2016-10-27 16:53:36 -07:00
parent 16b7fd45d7
commit 7c2051cc7a
8 changed files with 70 additions and 16 deletions

View file

@ -102,5 +102,10 @@ func (p *Persister) GetAttachmentsWithData(docID string) (attachments []entity.A
// DeleteAttachment deletes the id record from the database attachment table.
func (p *Persister) DeleteAttachment(id string) (rows int64, err error) {
return p.Base.DeleteConstrained(p.Context.Transaction, "attachment", p.Context.OrgID, id)
rows, err = p.Base.DeleteConstrained(p.Context.Transaction, "attachment", p.Context.OrgID, id)
// Mark references to this document as orphaned
err = p.MarkOrphanAttachmentLink(id)
return
}