Skip to content

Commit

Permalink
Port of PR #1015 by artofhuman
Browse files Browse the repository at this point in the history
  • Loading branch information
omab committed Dec 4, 2016
1 parent 6384c13 commit fcd91c6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased](https://github.com/python-social-auth/social-app-django/commits/master)

### Changed
- Add ON DELETE CASCADE for user fk (port of [#1015](https://github.com/omab/python-social-auth/pull/1015)
by artofhuman)
- Avoid usage of SubfieldBase on 1.8 and 1.9 versions (port of [#1008](https://github.com/omab/python-social-auth/pull/1008)
by tom-dalton-fanduel)

Expand Down
3 changes: 2 additions & 1 deletion social_django/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@

class AbstractUserSocialAuth(models.Model, DjangoUserMixin):
"""Abstract Social Auth association model"""
user = models.ForeignKey(USER_MODEL, related_name='social_auth')
user = models.ForeignKey(USER_MODEL, related_name='social_auth',
on_delete=models.CASCADE)
provider = models.CharField(max_length=32)
uid = models.CharField(max_length=UID_LENGTH)
extra_data = JSONField()
Expand Down

0 comments on commit fcd91c6

Please sign in to comment.