bcgov / bcgov/sdd-database

Refactor: Store null instead of empty string for optional employee fields in the DB

Open
#53 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

The parseEmployeeFormData function is written in such a way that we do not store null for empty/untouched employee fields in the database.

However, in the handleEditOffice, we do
```
const notes = formData.get("notes") as string || null;
```
So, we do store null here.

Hence, I need to make this consistent across. Make sure I store null for optional fields in employee as well in the DB

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.