Skip to content

fix(user): prevent NoneType error when additional_configs_urls is empty - #29

Open
aliwwwmo wants to merge 1 commit into
hiddify:devfrom
aliwwwmo:fix/none-type-split-additional-configs
Open

fix(user): prevent NoneType error when additional_configs_urls is empty#29
aliwwwmo wants to merge 1 commit into
hiddify:devfrom
aliwwwmo:fix/none-type-split-additional-configs

Conversation

@aliwwwmo

@aliwwwmo aliwwwmo commented Jun 4, 2026

Copy link
Copy Markdown

Description

This PR fixes a 500 Internal Server Error (specifically 'NoneType' object has no attribute 'split') that occurs when the additional_configs_urls setting is empty or null in the database.

Changes

  • Improved null-safety in hiddifypanel/panel/user/user.py.
  • Replaced direct .split("\n") call with a conditional check to ensure an empty list is passed to get_and_merge_urls if no URLs are configured.

Why this is needed

When a user hasn't configured any additional URLs, the panel currently crashes while trying to render the user page because it expects a string but receives None.
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant