Skip to content

Commit

Permalink
linked gmn swagger typehint fix, upload task status options
Browse files Browse the repository at this point in the history
  • Loading branch information
JJFlorian committed Apr 3, 2024
1 parent 7b829a7 commit 054cfaf
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
18 changes: 18 additions & 0 deletions api/migrations/0026_alter_uploadtask_status.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 5.0.1 on 2024-04-03 15:38

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('api', '0025_alter_importtask_progress'),
]

operations = [
migrations.AlterField(
model_name='uploadtask',
name='status',
field=models.CharField(blank=True, choices=[('PENDING', 'Pending'), ('PROCESSING', 'Processing'), ('COMPLETED', 'Completed'), ('FAILED', 'Failed')], default='PENDING', max_length=20),
),
]
4 changes: 3 additions & 1 deletion api/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ class UploadTask(models.Model):
)
metadata = JSONField("Metadata", default=dict, blank=False)
sourcedocument_data = JSONField("Sourcedocument data", default=dict, blank=False)
status = models.CharField(max_length=500, blank=True, null=True)
status = models.CharField(
max_length=20, choices=choices.STATUS_CHOICES, default="PENDING", blank=True
)
bro_id = models.CharField(max_length=500, blank=True, null=True)
log = models.TextField(blank=True)

Expand Down
2 changes: 1 addition & 1 deletion gmw/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Meta:
model = gmw_models.GMW
fields = "__all__"

def get_linked_gmns(self, obj):
def get_linked_gmns(self, obj) ->list:
try:
linked_gmns = set(
measuringpoint.gmn.uuid
Expand Down

0 comments on commit 054cfaf

Please sign in to comment.