Skip to content

Commit

Permalink
Remove Nlp trigger field from Analytical Statement
Browse files Browse the repository at this point in the history
  • Loading branch information
sudan45 committed Jul 16, 2024
1 parent 143bfe7 commit 26868f1
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 34 deletions.
Original file line number Diff line number Diff line change
@@ -1,23 +1,32 @@
# Generated by Django 3.2.25 on 2024-07-09 15:41
# Generated by Django 3.2.25 on 2024-07-16 09:43

from django.db import migrations, models


def delete_ids(apps, schema_editor):
AutomaticSummary = apps.get_model('analysis', 'AutomaticSummary')
AutomaticSummary.objects.all().delete()


class Migration(migrations.Migration):

dependencies = [
('analysis', '0015_auto_20240531_0504'),
]

operations = [
migrations.RunPython(
delete_ids,
reverse_code=migrations.RunPython.noop,
),
migrations.AddField(
model_name='automaticsummary',
name='information_gap',
name='analytical_statement',
field=models.TextField(blank=True),
),
migrations.AddField(
model_name='automaticsummary',
name='analytical_statement',
name='information_gap',
field=models.TextField(blank=True),
),
]
23 changes: 0 additions & 23 deletions apps/analysis/migrations/0017_auto_20240709_1707.py

This file was deleted.

6 changes: 2 additions & 4 deletions apps/analysis/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,8 +403,6 @@ class AnalyticalStatement(UserResource):
order = models.IntegerField()
report_text = models.TextField(blank=True)
information_gaps = models.TextField(blank=True)
is_statement_nlp_triggered = models.BooleanField(default=False)
is_information_gaps_nlp_triggered = models.BooleanField(default=False)
# added to keep the track of cloned analysisstatement
cloned_from = models.ForeignKey(
'AnalyticalStatement',
Expand Down Expand Up @@ -528,8 +526,8 @@ def save(self, *args, **kwargs):

class AutomaticSummary(EntriesCollectionNlpTriggerBase):
summary = models.TextField()
analytical_statement = models.TextField(blank=True)
information_gap = models.TextField(blank=True)
analytical_statement = models.TextField()
information_gap = models.TextField()
widget_tags = ArrayField(models.CharField(max_length=100), default=list)


Expand Down
2 changes: 0 additions & 2 deletions apps/analysis/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,6 @@ class Meta:
'include_in_report',
'order',
'cloned_from',
'is_statement_nlp_triggered',
'is_information_gaps_nlp_triggered',
# Custom
'entries',
'client_id',
Expand Down
2 changes: 0 additions & 2 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -1498,8 +1498,6 @@ input AnalyticalStatementGqlInputType {
includeInReport: Boolean
order: Int!
clonedFrom: ID
isStatementNlpTriggered: Boolean
isInformationGapsNlpTriggered: Boolean
entries: [AnalyticalEntriesGqlInputType!]
clientId: String
}
Expand Down

0 comments on commit 26868f1

Please sign in to comment.