Skip to content

Commit 13514b3

Browse files
committed
The use_json_field attribute is no longer needed.
1 parent 791c625 commit 13514b3

6 files changed

Lines changed: 6 additions & 12 deletions

File tree

hypha/apply/determinations/models.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ class Meta:
5151
form_fields = StreamField(
5252
DeterminationCustomFormFieldsBlock(),
5353
default=[],
54-
use_json_field=True,
5554
)
5655

5756
@property

hypha/apply/funds/models/forms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class ApplicationForm(models.Model):
1313
wagtail_reference_index_ignore = True
1414

1515
name = models.CharField(max_length=255)
16-
form_fields = StreamField(ApplicationCustomFormFieldsBlock(), use_json_field=True)
16+
form_fields = StreamField(ApplicationCustomFormFieldsBlock())
1717

1818
panels = [
1919
FieldPanel("name"),

hypha/apply/funds/models/submissions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ class ApplicationSubmission(
439439
metaclass=ApplicationSubmissionMetaclass,
440440
):
441441
form_data = models.JSONField(encoder=StreamFieldDataEncoder)
442-
form_fields = StreamField(ApplicationCustomFormFieldsBlock(), use_json_field=True)
442+
form_fields = StreamField(ApplicationCustomFormFieldsBlock())
443443
public_id = models.CharField(
444444
max_length=255, null=True, blank=True, unique=True, db_index=True
445445
)

hypha/apply/projects/models/project.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -254,9 +254,7 @@ class Project(BaseStreamForm, AccessFormData, models.Model):
254254
status = models.TextField(choices=PROJECT_STATUS_CHOICES, default=DRAFT)
255255

256256
form_data = models.JSONField(encoder=StreamFieldDataEncoder, default=dict)
257-
form_fields = StreamField(
258-
ProjectFormCustomFormFieldsBlock(), null=True, use_json_field=True
259-
)
257+
form_fields = StreamField(ProjectFormCustomFormFieldsBlock(), null=True)
260258

261259
# tracks read/write state of the Project
262260
is_locked = models.BooleanField(default=False)
@@ -500,14 +498,12 @@ class ProjectSOW(BaseStreamForm, AccessFormData, models.Model):
500498
Project, related_name="sow", on_delete=models.CASCADE
501499
)
502500
form_data = models.JSONField(encoder=StreamFieldDataEncoder, default=dict)
503-
form_fields = StreamField(
504-
ProjectFormCustomFormFieldsBlock(), null=True, use_json_field=True
505-
)
501+
form_fields = StreamField(ProjectFormCustomFormFieldsBlock(), null=True)
506502

507503

508504
class ProjectBaseStreamForm(BaseStreamForm, models.Model):
509505
name = models.CharField(max_length=255)
510-
form_fields = StreamField(ProjectFormCustomFormFieldsBlock(), use_json_field=True)
506+
form_fields = StreamField(ProjectFormCustomFormFieldsBlock())
511507

512508
panels = [
513509
FieldPanel("name"),

hypha/apply/projects/reports/models.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ class Report(BaseStreamForm, AccessFormData, models.Model):
9595
form_fields = StreamField(
9696
# Re-use the Project Custom Form class. The original fields (used at the time of response) should be required.
9797
ProjectFormCustomFormFieldsBlock(),
98-
use_json_field=True,
9998
null=True,
10099
)
101100
form_data = models.JSONField(encoder=StreamFieldDataEncoder, default=dict)

hypha/apply/review/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class ReviewFormFieldsMixin(models.Model):
4242
class Meta:
4343
abstract = True
4444

45-
form_fields = StreamField(ReviewCustomFormFieldsBlock(), use_json_field=True)
45+
form_fields = StreamField(ReviewCustomFormFieldsBlock())
4646

4747
@property
4848
def score_fields(self):

0 commit comments

Comments
 (0)