persepolisdm / persepolis

Persepolis is a download manager written in Python.
https://persepolisdm.github.io
GNU General Public License v3.0
6.32k stars 656 forks source link

fix updating addlink_db_table with null values. #1035

Closed alireza-delavari closed 1 month ago

alireza-delavari commented 1 month ago

as in this comment mentioned: https://github.com/persepolisdm/persepolis/issues/1020#issuecomment-2367416109

after enabling "Proxy" checkbox in properties for any link item in table and clicking on OK button, disabling "Proxy" checkbox wont save anymore.

its also same for other fields, for example setting "Referrer" field to empty wont save.

it was because of "updateAddLinkTable" method in "data_base.py" , when updating db table it was setting new null values to its previous stored value in db table. so we couldn't update anything to null anymore.

alireza-amirsamimi commented 1 month ago

Hello As I said there, I don't have this problem :) I can't confirm this bug.

alireza-delavari commented 1 month ago

did you fill IP and Port field when enabling proxy checkbox?

I filmed my steps to make the bug more clear: setting proxy check box enable, fill ip and port field, click ok, then setting proxy check box disable click ok , then open properties dialog again, proxy still is enable persepolis_1_proxy.webm

its the same for other fields: persepolis_2_referer.webm

alireza-amirsamimi commented 1 month ago

Thank you :+1: