Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
workspaces
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
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ssa
workspaces
Commits
d8211797
Commit
d8211797
authored
1 year ago
by
Charlotte Hausman
Browse files
Options
Downloads
Patches
Plain Diff
make sure user_email field doesn't override contacts_wrest when it's an analyst list only
parent
5dc50ff1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!1571
catch 2.8.2.3 up with main
,
!1527
make sure user_email field doesn't override contacts_wrest when it's an analyst list only
Pipeline
#12855
passed
1 year ago
Stage: pull-db
Stage: build
Stage: unit-test
Stage: .post
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
services/capability/capability/views/capability_version.py
+5
-3
5 additions, 3 deletions
services/capability/capability/views/capability_version.py
with
5 additions
and
3 deletions
services/capability/capability/views/capability_version.py
+
5
−
3
View file @
d8211797
...
...
@@ -25,7 +25,6 @@ import json
import
logging
import
subprocess
import
requests
from
pycapo
import
CapoConfig
from
pyramid.httpexceptions
import
HTTPBadRequest
,
HTTPNotFound
,
HTTPPreconditionFailed
from
pyramid.request
import
Request
...
...
@@ -394,9 +393,12 @@ def get_user_email(request: Request) -> Response:
if
not
version
.
parameters
:
not_found_msg
=
f
"
No parameters found for version
{
version_id
}
of request with ID
{
capability_request_id
}
. Couldn
'
t find user_email information.
"
return
HTTPNotFound
(
detail
=
not_found_msg
)
elif
"
user_email
"
in
version
.
parameters
and
version
.
parameters
[
"
user_email
"
]:
elif
(
"
user_email
"
in
version
.
parameters
and
version
.
parameters
[
"
user_email
"
]
and
"
workspaces-analysts
"
not
in
version
.
parameters
[
"
user_email
"
]):
# exclude the case of follow-on requests when the default user_email is the analyst list,
# otherwise send to specified address
return
Response
(
status_int
=
http
.
HTTPStatus
.
OK
,
json_body
=
{
"
resp
"
:
f
"
{
version
.
parameters
[
'
user_email
'
]
}
"
})
# If user_email not populated, search for the PI/CoI emails with the contacts_wrester
# If user_email not populated
(or is an analyst list)
, search for the PI/CoI emails with the contacts_wrester
elif
"
product_locator
"
in
version
.
parameters
and
version
.
parameters
[
"
product_locator
"
]:
process_call
=
[
"
aat_wrest
"
,
"
-sc
"
,
version
.
parameters
[
"
product_locator
"
]]
elif
"
sdmId
"
in
version
.
parameters
and
version
.
parameters
[
"
sdmId
"
]:
...
...
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