Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hypha
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ots
hypha
Commits
cde2759c
Commit
cde2759c
authored
2 years ago
by
Saurabh Kumar
Browse files
Options
Downloads
Patches
Plain Diff
update docstring for User -> get_or_create_and_notify
parent
734cbb2b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
hypha/apply/users/models.py
+6
-4
6 additions, 4 deletions
hypha/apply/users/models.py
with
6 additions
and
4 deletions
hypha/apply/users/models.py
+
6
−
4
View file @
cde2759c
...
@@ -123,16 +123,18 @@ class UserManager(BaseUserManager.from_queryset(UserQuerySet)):
...
@@ -123,16 +123,18 @@ class UserManager(BaseUserManager.from_queryset(UserQuerySet)):
return
params
return
params
def
get_or_create_and_notify
(
self
,
defaults
=
dict
(),
site
=
None
,
**
kwargs
):
def
get_or_create_and_notify
(
self
,
defaults
=
dict
(),
site
=
None
,
**
kwargs
):
"""
Create or get an account for applicant.
"""
Create or get an account for applicant.and send activation email to applicant.
Args:
Args:
defaults:
_descrip
tion
_
. Defaults to dict().
defaults:
Dict containing user attributes for user crea
tion. Defaults to dict().
site:
_description_
. Defaults to None.
site:
current site for sending activation email
. Defaults to None.
Raises:
Raises:
IntegrityError: if multiple account exist with same email
IntegrityError: if multiple account exist with same email
Returns:
Returns:
_description_
A tuple containing a user instance and a boolean that indicates
whether the user was created or not.
"""
"""
_created
=
False
_created
=
False
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment