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
efbeec4d
"opentech/apply/utils/blocks.py" did not exist on "e48d52d51ba4249d07dc60c2ff6024ede20c0753"
Commit
efbeec4d
authored
6 years ago
by
Todd Dembrey
Browse files
Options
Downloads
Patches
Plain Diff
Gh-858: make sure we handle batch transition in kwargs
parent
0c1595c8
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
opentech/apply/activity/messaging.py
+5
-2
5 additions, 2 deletions
opentech/apply/activity/messaging.py
with
5 additions
and
2 deletions
opentech/apply/activity/messaging.py
+
5
−
2
View file @
efbeec4d
...
@@ -200,11 +200,14 @@ class ActivityAdapter(AdapterBase):
...
@@ -200,11 +200,14 @@ class ActivityAdapter(AdapterBase):
def
recipients
(
self
,
message_type
,
**
kwargs
):
def
recipients
(
self
,
message_type
,
**
kwargs
):
return
[
None
]
return
[
None
]
def
extra_kwargs
(
self
,
message_type
,
submission
,
**
kwargs
):
def
extra_kwargs
(
self
,
message_type
,
submission
,
submissions
,
**
kwargs
):
from
.models
import
INTERNAL
from
.models
import
INTERNAL
if
message_type
in
[
MESSAGES
.
OPENED_SEALED
,
MESSAGES
.
REVIEWERS_UPDATED
,
MESSAGES
.
SCREENING
]:
if
message_type
in
[
MESSAGES
.
OPENED_SEALED
,
MESSAGES
.
REVIEWERS_UPDATED
,
MESSAGES
.
SCREENING
]:
return
{
'
visibility
'
:
INTERNAL
}
return
{
'
visibility
'
:
INTERNAL
}
if
message_type
==
MESSAGES
.
TRANSITION
and
not
submission
.
phase
.
permissions
.
can_view
(
submission
.
user
):
is_transition
=
message_type
in
[
MESSAGES
.
TRANSITION
,
MESSAGES
.
BATCH_TRANSITION
]
submission
=
submission
or
submissions
[
0
]
if
is_transition
and
not
submission
.
phase
.
permissions
.
can_view
(
submission
.
user
):
# User's shouldn't see status activity changes for stages that aren't visible to the them
# User's shouldn't see status activity changes for stages that aren't visible to the them
return
{
'
visibility
'
:
INTERNAL
}
return
{
'
visibility
'
:
INTERNAL
}
return
{}
return
{}
...
...
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