-
-
Notifications
You must be signed in to change notification settings - Fork 152
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
Conversation
# 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: |
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Misspelling: are_differenet
bika/lims/content/analysisrequest.py
Outdated
@@ -1852,6 +1851,8 @@ def _getAnalysesNum(self): | |||
total += 1 | |||
return verified,total | |||
|
|||
security.declareProtected(View, 'getResponsible') | |||
|
There was a problem hiding this comment.
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
bika/lims/content/analysisrequest.py
Outdated
@@ -1888,7 +1889,7 @@ def getResponsible(self): | |||
|
|||
return mngr_info | |||
|
|||
security.declareProtected(View, 'getResponsible') | |||
security.declareProtected(View, 'getManagers') |
There was a problem hiding this comment.
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
…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
No description provided.