fixes #4995 - editing location with 'all users' checked fails on edit page in postgres