stash
This commit is contained in:
parent
2218cc3543
commit
4671860fa4
6 changed files with 166 additions and 2 deletions
|
|
@ -0,0 +1,18 @@
|
|||
# Generated by Django 4.2.2
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('toolshed', '0023_remove_storagelocation_storagelocation_unique_owner_scoped_id_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='workflowinstance',
|
||||
name='current_step',
|
||||
field=models.PositiveIntegerField(default=1),
|
||||
),
|
||||
]
|
||||
|
|
@ -236,6 +236,7 @@ class StorageLocation(models.Model):
|
|||
class WorkflowInstance(models.Model):
|
||||
slug = models.CharField(max_length=255)
|
||||
state = models.CharField(max_length=255)
|
||||
current_step = models.PositiveIntegerField(default=1)
|
||||
payload = models.TextField(default='', blank=True) # an opaque, frontend-serialized JSON string on the backend.
|
||||
owner = models.ForeignKey(ToolshedUser, on_delete=models.CASCADE, related_name='workflows')
|
||||
staged_files = models.ManyToManyField(File, related_name='staged_by_workflows', blank=True)
|
||||
|
|
|
|||
|
|
@ -319,7 +319,7 @@ class WorkflowInstanceSerializer(serializers.ModelSerializer):
|
|||
|
||||
class Meta:
|
||||
model = WorkflowInstance
|
||||
fields = ['id', 'slug', 'state', 'payload', 'owner', 'staged_files', 'created_at', 'updated_at']
|
||||
fields = ['id', 'slug', 'state', 'current_step', 'payload', 'owner', 'staged_files', 'created_at', 'updated_at']
|
||||
read_only_fields = ['owner', 'staged_files', 'created_at', 'updated_at']
|
||||
|
||||
def get_staged_files(self, obj):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue