Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do a deepcopy of interims instead of a shallow copy #1697

Merged
merged 3 commits into from
Nov 30, 2020
Merged

Commits on Nov 29, 2020

  1. Fix interims with choices are not displayed in listings after a while

    When a value is set to an interim with choices, the listing initially
    displays the value correctly because remains in `senaite.app.listing`
    cache, but as soon as the list is filtered or the page refreshed, the
    value is not displayed anymore. Listing grabs the interims from the
    brain directly (`getInterimFields` metadata column), but even that
    `set_field` endpoint from `senaite.app.listing` stores the value and
    reindexes the analysis object, the value of the metadata field remains
    unchanged.
    
    This metadata column is only used in analysis listing and we already
    wake-up the analysis object to grab other properties while rendering
    the list, so there is no advantage at all of having this metadata
    column.
    
    Also, the fact that interims field is stored as a dict requires
    special care when storing/updating this value in ZODB. Again, because
    of the limited use of it, the complexity it entails is not worth.
    xispa committed Nov 29, 2020
    Configuration menu
    Copy the full SHA
    c765e7f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    175cffe View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c700a20 View commit details
    Browse the repository at this point in the history