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

NDEV-41 After verification, department managers are not updated in results report anymore #187

Merged
merged 2 commits into from
Jul 25, 2017

Conversation

Espurna
Copy link

@Espurna Espurna commented Jul 24, 2017

No description provided.

# elements which are in either of the sets A or B but not in both.
are_differenet = saved_managers_ids.symmetric_difference(
current_managers_ids)
if data and len(are_differenet) == 0:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say this conditional if data should be placed in line 723, like this:

if not overwrite 
    # Prevent any error related with digest
    data = ar.getDigest() if hasattr(ar, 'getDigest') else None
    if data:
        # Check if the department managers have changed since the
        # verification:
        saved_managers = data.get('managers', {})
        ....
        if len(are_different) == 0:
            ....

current_managers])
# The symmetric difference of two sets A and B is the set of
# elements which are in either of the sets A or B but not in both.
are_differenet = saved_managers_ids.symmetric_difference(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Misspelling: are_differenet

@@ -1852,6 +1851,8 @@ def _getAnalysesNum(self):
total += 1
return verified,total

security.declareProtected(View, 'getResponsible')

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not important, but better use @security.public decorator instead of security.declareProtected. Clener and easier to remember.
Example: https://github.com/naralabs/bika.lims/blob/wip/bika/lims/content/analysis.py#L27

@@ -1888,7 +1889,7 @@ def getResponsible(self):

return mngr_info

security.declareProtected(View, 'getResponsible')
security.declareProtected(View, 'getManagers')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as the previous comment

@xispa xispa merged commit 0ba97de into wip Jul 25, 2017
@xispa xispa deleted the task/NDEV-41-department-managers branch August 24, 2017 08:10
@xispa xispa changed the title NDEV-41 After verification, department managers are not updated any more NDEV-41 After verification, department managers are not updated in results report anymore Oct 9, 2017
Ruhanga pushed a commit to Ruhanga/senaite.core that referenced this pull request Mar 14, 2022
…ite#187)

* Allow to introduce the Age instead of Date of Birth for Patient

This commit makes the field Age from Patient Add/Edit form to be
visible and editable when the option "Estimated Date of Birth" is
checked, while "Birth Date" field remains hidden. User can then
introduce the age in years, months and days and the date of birth
is then calculated automatically (not accurate).

When the option "Estimated Date of Birth" is unchecked, the age
fields become hidden, while the "Birth Date" becomes visible for
user input.

* Age splitted is empty in Patient edit form
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants