khodedawsh / marzneshin

A fork of Marzban aiming for scalability
https://t.me/marzneshins
GNU Affero General Public License v3.0
78 stars 5 forks source link

[BUG] host edit/creation doesn't set values to null when filled and removed #338

Closed khodedawsh closed 3 weeks ago

khodedawsh commented 3 weeks ago

Describe the bug when you create/edit a host and fill in port, after removing the port and submitting you'd get 422 because port value is set to '' and the server doesn't accept it.

To Reproduce Steps to reproduce the behavior:

  1. open hosts page
  2. edit a host
  3. fill port
  4. click submit
  5. edit the host again
  6. remove port
  7. click submit

Expected behavior port should be set to null, preferably along other fields