mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-20 14:54:15 +01:00
(bug) cannot create event
This commit is contained in:
parent
770d1edbe6
commit
9dc85ee80b
@ -100,7 +100,7 @@ export const EventForm: React.FC<EventFormProps> = ({ action, event, onError, on
|
||||
* Callback triggered when the user validates the machine form: handle create or update
|
||||
*/
|
||||
const onSubmit: SubmitHandler<Event> = (data: Event) => {
|
||||
if (data.pre_registration_end_date.toString() === 'Invalid Date') {
|
||||
if (data.pre_registration_end_date?.toString() === 'Invalid Date') {
|
||||
data.pre_registration_end_date = null;
|
||||
}
|
||||
if (action === 'update') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user