Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cht-user-management",
"version": "2.1.10",
"version": "2.1.11",
"main": "dist/index.js",
"dependencies": {
"@bull-board/api": "^5.17.0",
Expand Down
4 changes: 2 additions & 2 deletions scripts/deploy/values/users-chis-civ.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cht-user-management:
enabled: true
image:
repository: public.ecr.aws/medic/cht-user-management
tag: "2.1.10" # Set this to the version of the docker image
tag: "2.1.11" # Set this to the version of the docker image

# Environment variablues to set in the pod, for example:
# env:
Expand Down Expand Up @@ -51,7 +51,7 @@ cht-user-management-worker:
replicaCount: 1
image:
repository: public.ecr.aws/medic/cht-user-management-worker
tag: "2.1.10"
tag: "2.1.11"
env:
NODE_ENV: production
REDIS_HOST: users-chis-civ-redis-master.users-chis-prod.svc.cluster.local
Expand Down
4 changes: 2 additions & 2 deletions scripts/deploy/values/users-chis-ke.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cht-user-management:
enabled: true
image:
repository: public.ecr.aws/medic/cht-user-management
tag: "2.1.10" # Set this to the version of the docker image
tag: "2.1.11" # Set this to the version of the docker image

# Environment variablues to set in the pod, for example:
# env:
Expand Down Expand Up @@ -51,7 +51,7 @@ cht-user-management-worker:
replicaCount: 1
image:
repository: public.ecr.aws/medic/cht-user-management-worker
tag: "2.1.10"
tag: "2.1.11"
env:
NODE_ENV: production
REDIS_HOST: users-chis-ke-redis-master.users-chis-prod.svc.cluster.local
Expand Down
4 changes: 2 additions & 2 deletions scripts/deploy/values/users-chis-ml.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cht-user-management:
enabled: true
image:
repository: public.ecr.aws/medic/cht-user-management
tag: "2.1.10" # Set this to the version of the docker image
tag: "2.1.11" # Set this to the version of the docker image

# Environment variablues to set in the pod, for example:
# env:
Expand Down Expand Up @@ -51,7 +51,7 @@ cht-user-management-worker:
replicaCount: 1
image:
repository: public.ecr.aws/medic/cht-user-management-worker
tag: "2.1.10"
tag: "2.1.11"
env:
NODE_ENV: production
REDIS_HOST: users-chis-ml-redis-master.users-chis-prod.svc.cluster.local
Expand Down
4 changes: 2 additions & 2 deletions scripts/deploy/values/users-chis-tg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cht-user-management:
enabled: true
image:
repository: public.ecr.aws/medic/cht-user-management
tag: "2.1.10" # Set this to the version of the docker image
tag: "2.1.11" # Set this to the version of the docker image

# Environment variablues to set in the pod, for example:
# env:
Expand Down Expand Up @@ -51,7 +51,7 @@ cht-user-management-worker:
replicaCount: 1
image:
repository: public.ecr.aws/medic/cht-user-management-worker
tag: "2.1.10"
tag: "2.1.11"
env:
NODE_ENV: production
REDIS_HOST: users-chis-tg-redis-master.users-chis-prod.svc.cluster.local
Expand Down
4 changes: 4 additions & 0 deletions src/services/session-cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import _ from 'lodash';
import ChtSession from '../lib/cht-session';
import { DirectiveFilter } from './directive-model';
import Place, { PlaceUploadState } from './place';
import { Config } from '../config';

export type SessionCacheUploadState = 'in_progress' | 'done' | 'staged';

Expand Down Expand Up @@ -61,6 +62,9 @@ export default class SessionCache {
nameIncludes?: string;
}): { canEdit?: boolean; places: Place[] }[] => {
const places = this.getPlaces(options);
if (options?.type && !Config.getContactType(options.type).can_assign_multiple) {
Copy link
Member

Choose a reason for hiding this comment

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

it is odd to check type has a value, but also remove the ? which indicates that it "could not have a value"
which is it? is it always defined or do we need to check it? i think it is the former and change on line 55 should be reverted

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

is it always defined or do we need to check it

options object could be undefined. Let me revert line 56 since it doesn't really change anything

return [{ places }];
}
return Object.values(
_.groupBy(places, (p) => p.contact.id)
)
Expand Down