[bug] Akkoma FE sending invalid value for poll expiration #290

Closed
opened 2023-03-19 13:32:08 +00:00 by xarvos · 1 comment
Contributor

Version

85abc62

What were you trying to do?

I was creating a poll that ends in 69 hours, but it also occurs when I create one that ends in 69 days. Probably some other durations as well.

What did you expect to happen?

The polls are created successfully.

What actually happened?

Error popup showing: "Error: expires_in - Invalid integer. Got: string"

The response status is 400 and upon checking the request, I found that 69 hours is sent as 248400.00000000003 and 69 days as 5961600.000000001.

Severity

I cannot use it as easily as I'd like

Have you searched for this issue?

  • I have double-checked and have not found this issue mentioned anywhere.
### Version 85abc62 ### What were you trying to do? I was creating a poll that ends in 69 hours, but it also occurs when I create one that ends in 69 days. Probably some other durations as well. ### What did you expect to happen? The polls are created successfully. ### What actually happened? Error popup showing: "Error: expires_in - Invalid integer. Got: string" The response status is 400 and upon checking the request, I found that 69 hours is sent as 248400.00000000003 and 69 days as 5961600.000000001. ### Severity I cannot use it as easily as I'd like ### Have you searched for this issue? - [x] I have double-checked and have not found this issue mentioned anywhere.
Author
Contributor

I've checked the source and it seems relevant files (src/services/date_utils/date_utils.js and src/components/poll/poll_form.js) didn't have any change regarding this. Was there some change in the backend that force this field to be integer and fallback to string?

I've checked the source and it seems relevant files (src/services/date_utils/date_utils.js and src/components/poll/poll_form.js) didn't have any change regarding this. Was there some change in the backend that force this field to be integer and fallback to string?
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: AkkomaGang/akkoma-fe#290
No description provided.