Skip to content

Commit

Permalink
Merge pull request #1247 from bcgov/dev-MD-3622
Browse files Browse the repository at this point in the history
3622 - Handle documents with no attributes present
  • Loading branch information
milosdes authored Dec 31, 2024
2 parents 272c889 + affcc8e commit ba389f8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/reviewer_api/services/documentservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,8 @@ def updatedocumentpersonalattributes(self, payload, userid):
if(len(payload["documentmasterids"]) > 1):
for attribute in payload["personalattributes"]:
if(payload["personalattributes"][attribute] is not None and len(payload["personalattributes"][attribute]) > 0):
if 'personalattributes' not in newdocattributes:
newdocattributes['personalattributes'] = {}
newdocattributes["personalattributes"][attribute]=payload["personalattributes"][attribute]
#apply change to individual
else:
Expand Down

0 comments on commit ba389f8

Please sign in to comment.