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
105a8c14
Commit
105a8c14
authored
4 years ago
by
Shrikrishna Singh
Browse files
Options
Downloads
Patches
Plain Diff
Only Check ApplicationMustIncludeFieldBlock instead of individual blocks
parent
0f9f6bbe
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
hypha/apply/stream_forms/models.py
+2
-2
2 additions, 2 deletions
hypha/apply/stream_forms/models.py
with
2 additions
and
2 deletions
hypha/apply/stream_forms/models.py
+
2
−
2
View file @
105a8c14
...
...
@@ -3,7 +3,7 @@ from collections import OrderedDict
from
wagtail.contrib.forms.models
import
AbstractForm
from
hypha.apply.funds.blocks
import
EmailBlock
,
FullNameBlock
,
Title
Block
from
hypha.apply.funds.blocks
import
ApplicationMustIncludeField
Block
from
.blocks
import
(
FormFieldBlock
,
...
...
@@ -54,7 +54,7 @@ class BaseStreamForm:
struct_value
=
struct_child
.
value
if
isinstance
(
block
,
FormFieldBlock
):
field_from_block
=
block
.
get_field
(
struct_value
)
if
draft
and
not
is
instance
(
block
,
(
EmailBlock
,
FullNameBlock
,
Title
Block
)
)
:
if
draft
and
not
is
subclass
(
block
.
__class__
,
ApplicationMustIncludeField
Block
):
field_from_block
.
required
=
False
field_from_block
.
help_link
=
struct_value
.
get
(
'
help_link
'
)
field_from_block
.
group_number
=
group_counter
if
is_in_group
else
1
...
...
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