Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

someting wrong in constraint mac_check #2

Open
helloworld113 opened this issue Jul 24, 2020 · 2 comments
Open

someting wrong in constraint mac_check #2

helloworld113 opened this issue Jul 24, 2020 · 2 comments

Comments

@helloworld113
Copy link

when use django admin to add device Printers、 Voips and others the mac check Can't pass, my mac aadress is follow the rule but the website throw mac_check error.

CONSTRAINT voip_mac_check CHECK (((length((mac)::text) = 17) AND ((mac)::text ~ '[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}'::text)))
)
@helloworld113
Copy link
Author

当使用django admin添加设备Printers,Voips等其他设备时,mac检查无法通过,我的mac地址是遵循规则,但是网站抛出mac_check错误。

CONSTRAINT voip_mac_check CHECK (((length((mac)::text) = 17) AND ((mac)::text ~ '[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}'::text)))
)

I am try to delete the CONSTRAINT then it work well.

@carlosjordao
Copy link
Owner

carlosjordao commented Jul 24, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants