Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GraceDB Server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Michael William Coughlin
GraceDB Server
Commits
a280376f
Commit
a280376f
authored
10 years ago
by
Branson Craig Stephens
Browse files
Options
Downloads
Patches
Plain Diff
Fixed userprofile.views.
parent
b3831478
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
userprofile/views.py
+6
-6
6 additions, 6 deletions
userprofile/views.py
with
6 additions
and
6 deletions
userprofile/views.py
+
6
−
6
View file @
a280376f
...
...
@@ -29,15 +29,15 @@ def create(request):
# Create the Trigger
t
=
Trigger
(
user
=
request
.
user
)
labels
=
form
.
cleaned_data
[
'
labels
'
]
atyp
es
=
form
.
cleaned_data
[
'
atyp
es
'
]
pipelin
es
=
form
.
cleaned_data
[
'
pipelin
es
'
]
contacts
=
form
.
cleaned_data
[
'
contacts
'
]
farThresh
=
form
.
cleaned_data
[
'
farThresh
'
]
if
contacts
and
(
labels
or
atyp
es
):
if
contacts
and
(
labels
or
pipelin
es
):
t
.
save
()
# Need an id before relations can be set.
try
:
t
.
labels
=
labels
t
.
atypes
=
atyp
es
t
.
pipelines
=
pipelin
es
t
.
contacts
=
contacts
t
.
farThresh
=
farThresh
except
:
...
...
@@ -49,10 +49,10 @@ def create(request):
try
:
if
not
contacts
:
message
+=
"
You must specify at least one contact.
"
if
not
(
labels
or
atyp
es
):
message
+=
"
You need to indicate label(s) and/or
analysis typ
e(s).
"
if
not
(
labels
or
pipelin
es
):
message
+=
"
You need to indicate label(s) and/or
pipelin
e(s).
"
except
NameError
:
# form is not valid, so labels, contacts and
atyp
es were not set.
# form is not valid, so labels, contacts and
pipelin
es were not set.
# hopefully, there are error messages in the form.
pass
else
:
...
...
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