Giter Club home page Giter Club logo

Comments (3)

profcturner avatar profcturner commented on June 8, 2024

Unit tests and further investigation seem to show this is a red herring. So closing for now.

from wam.

profcturner avatar profcturner commented on June 8, 2024

On second thoughts, that's a stupid idea. Renaming the bug. It would appear the culprit was a module with one of its programmes from outside the WorkPackage. This shouldn't happen, and could only happen from using the Django built in admin to change the programmes. However, that is still available currently.

Best workaround: ensure staff use the custom admin rather than generic Django admin.

Further work needed: how to resolve this when really it's a data integrity issue.

__clone_programmes() currently (and correctly) only examines programmes from the source package, building up a mapping in programme_mapping() as it clones each one.

When the modules are cloned then if a module has a programme from outside the package there will be no valid mapping for this. It might be cleanest to simply remove the mapping from the destination package, and flag this as a warning in the clone process.

from wam.

profcturner avatar profcturner commented on June 8, 2024

A unit test was added that was tripped by this issue by deliberately moving a module to an alternative source package. The cloning logic was then adapted to only attempt to remap programmes where a mapping existed. The upshot is any links to programmes not in the correct source package (they all should be) will be severed in the cloning process and an error logged, but the clone process should then carry on regardless.

from wam.

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.