Skip to content

Commit

Permalink
Handle null deployment frequency in edit form
Browse files Browse the repository at this point in the history
  • Loading branch information
NickPhura committed Oct 1, 2024
1 parent b068ca3 commit 2fc0742
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,8 @@ PUT.apiDoc = {
nullable: true
},
frequency: {
type: 'number'
type: 'number',
nullable: true
},
frequency_unit: {
type: 'number',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export const EditDeploymentPage = () => {
critter_id: values.critter_id,
device_id: Number(values.device_id),
device_make: values.device_make,
frequency: values.frequency,
frequency: values.frequency || null, // nullify if empty string
frequency_unit: values.frequency_unit,
device_model: values.device_model,
critterbase_start_capture_id: values.critterbase_start_capture_id,
Expand Down

0 comments on commit 2fc0742

Please sign in to comment.