Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions django_userforeignkey/models/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ def __init__(self, auto_user=False, auto_user_add=False, **kwargs):
kwargs['to'] = settings.AUTH_USER_MODEL

if auto_user or auto_user_add:
kwargs['on_delete'] = SET_NULL
kwargs['null'] = True
kwargs['on_delete'] = kwargs.get('on_delete', SET_NULL)
kwargs['null'] = kwargs.get('null', True)
kwargs['blank'] = True
kwargs['editable'] = kwargs.get('editable', False)

Expand Down