Skip to content

Special character (#) in Device name returns error on save #644

@SirAfino

Description

@SirAfino

Is there an existing issue for this?

Current Behavior

When updating a Device information, if the name contains a # character (in the example, the name was "Smart Plug (VR #2)"), the save process fails with the following error:

`Error updating device

UPDATE Devices SET
dev_Name = "Smart Plug (VR ",
dev_Owner = "",
dev_DeviceType = "",
dev_Vendor = "",
dev_Icon = "",
dev_Favorite = "",
dev_Group = "",
dev_Location = "",
dev_Comments = "",
dev_Network_Node_MAC_ADDR = "",
dev_Network_Node_port = "",
dev_StaticIP = "",
dev_ScanCycle = "",
dev_AlertEvents = "",
dev_AlertDeviceDown = "",
dev_SkipRepeated = "",
dev_NewDevice = "",
dev_Archived = ""
WHERE dev_MAC="....."

CHECK constraint failed: dev_Favorite IN (0, 1)`

Expected Behavior

Device information should be correctly saved

Steps To Reproduce

  1. Edit a Device name adding a # character in the name.

app.conf

No response

docker-compose.yml

No response

What branch are you running?

Production

app.log

No response

Debug enabled

  • I have read and followed the steps in the wiki link above and provided the required debug logs and the log section covers the time when the issue occurs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛Something isn't workingnext release/in dev image 🚀This is coming in the next release or was already released if the issue is Closed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions