diff --git a/apps/analysis/migrations/0016_auto_20240709_1541.py b/apps/analysis/migrations/0016_auto_20240716_0943.py similarity index 62% rename from apps/analysis/migrations/0016_auto_20240709_1541.py rename to apps/analysis/migrations/0016_auto_20240716_0943.py index e9ce4eb83f..8574feebbc 100644 --- a/apps/analysis/migrations/0016_auto_20240709_1541.py +++ b/apps/analysis/migrations/0016_auto_20240716_0943.py @@ -1,8 +1,13 @@ -# 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 = [ @@ -10,14 +15,18 @@ class Migration(migrations.Migration): ] 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), ), ] diff --git a/apps/analysis/migrations/0017_auto_20240709_1707.py b/apps/analysis/migrations/0017_auto_20240709_1707.py deleted file mode 100644 index 5017bb2503..0000000000 --- a/apps/analysis/migrations/0017_auto_20240709_1707.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 3.2.25 on 2024-07-09 17:07 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('analysis', '0016_auto_20240709_1541'), - ] - - operations = [ - migrations.AddField( - model_name='analyticalstatement', - name='is_information_gaps_nlp_triggered', - field=models.BooleanField(default=False), - ), - migrations.AddField( - model_name='analyticalstatement', - name='is_statement_nlp_triggered', - field=models.BooleanField(default=False), - ), - ] diff --git a/apps/analysis/models.py b/apps/analysis/models.py index b64b658b87..4292313f39 100644 --- a/apps/analysis/models.py +++ b/apps/analysis/models.py @@ -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', @@ -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) diff --git a/apps/analysis/serializers.py b/apps/analysis/serializers.py index 1dd119d840..fbc4a41654 100644 --- a/apps/analysis/serializers.py +++ b/apps/analysis/serializers.py @@ -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', diff --git a/schema.graphql b/schema.graphql index d06fd753cd..78207cc6d7 100644 --- a/schema.graphql +++ b/schema.graphql @@ -1498,8 +1498,6 @@ input AnalyticalStatementGqlInputType { includeInReport: Boolean order: Int! clonedFrom: ID - isStatementNlpTriggered: Boolean - isInformationGapsNlpTriggered: Boolean entries: [AnalyticalEntriesGqlInputType!] clientId: String }