Skip to content

IntegrityError when POST data is None on NOT NULL field

When a field is NOT NULL and it's not given to LDPSerializer, it throws an IntegrityError rather than a ValidationError (which will raise a server error rather than a client error)

This is affecting both NOT NULL fields on my parent model, and NOT NULL fields on a related model which I am submitting in a nested field

See applications/hubl#966 (comment 51050) for background

Edited by Calum Mackervoy