curiosum-dev / permit

An uniform authorization library for Elixir. Supports Plug and Phoenix LiveView, aims for much more.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fix semantics of like/ilike operators when `nil` is given

vincentvanbush opened this issue · comments

Permit.Operators.Ilike and Permit.Operators.Like use the =~ operator for mimicking typical SQL behaviour of LIKE and ILIKE, which now results in it causing errors when nil value of a field is given.

To make its behaviour in line with that typical SQL behaviour, it should return false in that case.