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
8222cea6
Commit
8222cea6
authored
6 years ago
by
Dan Braghis
Browse files
Options
Downloads
Patches
Plain Diff
Tidy up
parent
3e6694b5
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
opentech/apply/determinations/forms.py
+4
-5
4 additions, 5 deletions
opentech/apply/determinations/forms.py
opentech/apply/funds/views.py
+1
-1
1 addition, 1 deletion
opentech/apply/funds/views.py
with
5 additions
and
6 deletions
opentech/apply/determinations/forms.py
+
4
−
5
View file @
8222cea6
...
...
@@ -60,17 +60,17 @@ class BaseDeterminationForm(forms.ModelForm):
def
clean
(
self
):
cleaned_data
=
super
().
clean
()
if
not
self
.
draft_button_name
in
self
.
data
:
if
self
.
draft_button_name
not
in
self
.
data
:
action_name
=
self
.
request
.
GET
.
get
(
'
action
'
)
if
not
action_name
:
# The action name was not passed as a request parameter, so derive it
# from the determination and submission status
determination
=
int
(
cleaned_data
[
'
determination
'
])
suffix
=
'
_more_info
'
if
cleaned_data
[
'
determination
'
]
==
APPROVED
:
if
determination
==
APPROVED
:
suffix
=
'
_accepted
'
elif
cleaned_data
[
'
determination
'
]
==
UNAPPROVED
:
elif
determination
==
UNAPPROVED
:
suffix
=
'
_rejected
'
# Use get_available_status_transitions()?
for
key
,
_
in
self
.
submission
.
phase
.
transitions
.
items
():
action_name
=
key
if
suffix
in
key
else
None
...
...
@@ -89,7 +89,6 @@ class BaseDeterminationForm(forms.ModelForm):
self
.
instance
.
determination
=
int
(
self
.
cleaned_data
[
'
determination
'
])
self
.
instance
.
determination_message
=
self
.
cleaned_data
[
'
determination_message
'
]
self
.
instance
.
is_draft
=
self
.
draft_button_name
in
self
.
data
or
self
.
instance
.
determination
==
UNDETERMINED
self
.
instance
.
is_draft
=
True
if
self
.
transition
:
self
.
transition
(
by
=
self
.
request
.
user
)
...
...
This diff is collapsed.
Click to expand it.
opentech/apply/funds/views.py
+
1
−
1
View file @
8222cea6
...
...
@@ -75,7 +75,7 @@ class ProgressSubmissionView(DelegatedViewMixin, UpdateView):
action
=
form
.
cleaned_data
.
get
(
'
action
'
)
# Defer to the determination form for any of the determination transitions
if
action
in
DETERMINATION_RESPONSE_TRANSITIONS
:
return
HttpResponseRedirect
(
reverse_lazy
(
'
apply:submissions:determinations:form
'
,
args
=
(
form
.
instance
.
id
,))
\
return
HttpResponseRedirect
(
reverse_lazy
(
'
apply:submissions:determinations:form
'
,
args
=
(
form
.
instance
.
id
,))
+
"
?action=
"
+
action
)
response
=
super
().
form_valid
(
form
)
...
...
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