Skip to content

Commit

Permalink
Merge pull request #494 from droberts-ctrlo/notes-field-fix
Browse files Browse the repository at this point in the history
Fix for user notes not persisting when saving users [B: 1736]
  • Loading branch information
abeverley authored Dec 5, 2024
2 parents 44d7f03 + 3c902a7 commit 6ee13ac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/GADS/API.pm
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ sub _post_add_user_account
department_id => $body->{department_id},
team_id => $body->{team_id},
account_request => 0,
account_request_notes => $body->{notes},
account_request_notes => $body->{notes} || $body->{account_request_notes},
view_limits => $body->{view_limits},
groups => $body->{groups},
);
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/components/modal/modals/user/lib/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ class UserModalComponent extends ModalComponent {
data[$(field).attr('name')] = fieldValue
}
}
} else if ($(field).val() !== '') {
const fieldValue = $(field).val()
} else if ($(field).val()|| $(field).value) {
const fieldValue = $(field).val() || $(field).value
const fieldParsedValue = isNaN(fieldValue) ? this.parseValue(fieldValue) : parseInt(fieldValue)
if (Array.isArray(data[$(field).attr('name')])) {
data[$(field).attr('name')].push(fieldParsedValue)
Expand Down

0 comments on commit 6ee13ac

Please sign in to comment.