Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
beat
beat.web
Commits
1f582ca6
Commit
1f582ca6
authored
Jun 16, 2020
by
Flavio TARSETTI
Browse files
[accounts][signals] pre-commit cleanup
parent
6720584a
Changes
1
Hide whitespace changes
Inline
Side-by-side
beat/web/accounts/signals.py
View file @
1f582ca6
...
...
@@ -47,7 +47,7 @@ supervision_request = django.dispatch.Signal()
@
receiver
(
post_save
,
sender
=
User
)
def
setup_user
(
sender
,
instance
,
created
,
**
kwargs
):
if
created
and
not
instance
.
pk
==
settings
.
ANONYMOUS_USER_ID
:
default_group
,
created
=
Group
.
objects
.
get_or_create
(
name
=
'
Default
'
)
default_group
,
created
=
Group
.
objects
.
get_or_create
(
name
=
"
Default
"
)
instance
.
groups
.
add
(
default_group
)
Token
.
objects
.
create
(
user
=
instance
)
AccountSettings
.
objects
.
create
(
owner
=
instance
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment