DOMjudge / domjudge

DOMjudge programming contest jury system
https://www.domjudge.org
GNU General Public License v2.0
719 stars 254 forks source link

`timeLimit` field type error in `DataTransferObject/Shadowing /ProblemEvent.php` #2601

Closed Dup4 closed 3 months ago

Dup4 commented 3 months ago

Description of the problem

I'm using DOMjudge8.3.0 to shadow another DOMjudge8.3.0 instance.

f9b5dbd567f3cb4333994b0dd9ad8d03

The above error was reported.

{"token":"1139","id":"xxx","type":"problems","data":{"ordinal":0,"id":"xxx","short_name":"A","rgb":"#000000","color":"black","label":"A","time_limit":1.0,"statement":[],"externalid":"xxx","name":"xxx","test_data_count":27},"time":"2024-06-15T21:24:31.902+08:00"}

I checked the event that caused the error, and I can see that the time_limit field in it is indeed of type float.

https://ccs-specs.icpc.io/2022-07/contest_api#problems

image

And inside ccs-spec, it can indeed be a float type

https://github.com/DOMjudge/domjudge/blob/3002fb3d6cf22be7d5037075c340100800515a0b/webapp/src/DataTransferObject/Shadowing/ProblemEvent.php#L10

in DOMjudge's code, it is of type int, but when I change it to float, the shadow works fine.

Your environment