Add WorkflowJob.instance_groups and distinguish from char_prompts

This removes a loop that ran on import
  the loop was giving the wrong behavior
  and it initialized too many fields as char_prompts fields

With this, we will now enumerate the char_prompts type fields manually
This commit is contained in:
Alan Rominger
2022-09-08 11:49:35 -04:00
parent 697193d3d6
commit 68e11d2b81
5 changed files with 85 additions and 14 deletions

View File

@@ -489,3 +489,14 @@ class WorkflowJobNodeBaseInstanceGroupMembership(models.Model):
default=None,
db_index=True,
)
class WorkflowJobInstanceGroupMembership(models.Model):
workflowjobnode = models.ForeignKey('WorkflowJob', on_delete=models.CASCADE)
instancegroup = models.ForeignKey('InstanceGroup', on_delete=models.CASCADE)
position = models.PositiveIntegerField(
null=True,
default=None,
db_index=True,
)