That is not the problem. There is no user with id==0. The problem is that modified_by seems to default to 0 instead of auth.user_id. Are you sure you are logged in?
Massimo On Jun 21, 1:51 am, pbreit <[email protected]> wrote: > I'm trying to edit a record in admin but am getting an fkey violation. This > kind of makes sense since I guess the admin is user=0. But if I'm logged in > as user.id=1 should I be able to avoid the restriction? > > IntegrityError: insert or update on table "item" violates foreign key > constraint "item_modified_by_fkey" > DETAIL: Key (modified_by)=(0) is not present in table "auth_user".

