[Answer]-Selecting rows with primary key field = null

1👍

maybe your post data isnt sending as expected. Try printing object_id when running the python code and see what you got. you should really consider making all PK’s as NOT NULL in your database configuration. To search for null values, None should do it

try setting a default value to your post data

object_id = request.POST.get('id', None)
👤sciweb

Leave a comment