Skip to content

Commit

Permalink
Fix hard-coded primary key of PageUser (#7034)
Browse files Browse the repository at this point in the history
Co-authored-by: Mark Walker <theshow@gmail.com>
  • Loading branch information
monim67 and marksweb committed May 14, 2021
1 parent 1dc0478 commit c38fde3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cms/signals/permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def post_save_user(instance, raw, created, **kwargs):
if not creator or not created or creator.is_anonymous:
return

page_user = PageUser(user_ptr_id=instance.pk, created_by=creator)
page_user = PageUser(pk=instance.pk, created_by=creator)
page_user.__dict__.update(instance.__dict__)
page_user.save()

Expand Down

2 comments on commit c38fde3

@Aiky30
Copy link
Contributor

@Aiky30 Aiky30 commented on c38fde3 May 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for future reference this should have had passing tests and a changelog entry.

@marksweb
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Aiky30 Tests is fair, but we're moving to generated (automated) changelog updates so they won't come in through the PR authors anymore.

Please sign in to comment.