Giter Site home page Giter Site logo

Comments (5)

elliotcm avatar elliotcm commented on July 18, 2024 1

I've now gone through this myself.

I've followed the steps above on integration and could not reproduce the issue. Everything in whitehall's DB wound up as you would expect.

I do agree that the attachments listed above ended up in an odd non-deleted state while the edition itself is marked as deleted which appears impossible due to the code linked above which deletes all attachments when the edition is deleted

However, the code for this asset deletion was added 23 March 2016, while the edition in question was discarded 9 May 2014. The commit where the code was added calls this situation out specifically, though it leaves out the asset manager issue as it was presumably not a thing for whitehall at the time.

I'm guessing that when the assets were imported from whitehall to asset manager this discrepancy was copied over accidentally.

from asset-manager.

floehopper avatar floehopper commented on July 18, 2024

Note that I had a go at extending the relevant integration test to include this scenario in this branch, although I'm not sure it's quite right.

from asset-manager.

floehopper avatar floehopper commented on July 18, 2024

I think there might be an issue with AttachmentData#deleted?, because it looks as if it only takes into account whether the edition has been deleted; I think it should also take into account whether the Attachment is marked as deleted, i.e. when a single attachment is deleted and the edition is not deleted.

from asset-manager.

floehopper avatar floehopper commented on July 18, 2024

I think there might be an issue with AttachmentData#deleted?, because it looks as if it only takes into account whether the edition has been deleted; I think it should also take into account whether the Attachment is marked as deleted, i.e. when a single attachment is deleted and the edition is not deleted.

I don't think the above statement about AttachmentData#deleted? is true after all. I think I must've been confused by the mention of "attachable" in the include_deleted_attachables option passed to AttachmentData#significant_attachment.

In fact, as the name clearly suggests, the latter returns an instance of an Attachment and thus AttachmentData#deleted? does take account of whether the attachment has been marked as deleted.

I thought this was worth clarifying, but note that this doesn't resolve the original problem as described in the issue description.

from asset-manager.

thomasleese avatar thomasleese commented on July 18, 2024

Closing this as the investigation is complete and we have a card to complete the follow up work.

from asset-manager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.