blueprints: add default status

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2022-08-16 17:51:22 +02:00
parent 1f9e9f9ca0
commit aea0958f3f
2 changed files with 5 additions and 2 deletions

View File

@ -113,7 +113,8 @@ class Migration(migrations.Migration):
("error", "Error"),
("orphaned", "Orphaned"),
("unknown", "Unknown"),
]
],
default="unknown",
),
),
("enabled", models.BooleanField(default=True)),

View File

@ -54,7 +54,9 @@ class BlueprintInstance(SerializerModel, ManagedModel, CreatedUpdatedModel):
context = models.JSONField(default=dict)
last_applied = models.DateTimeField(auto_now=True)
last_applied_hash = models.TextField()
status = models.TextField(choices=BlueprintInstanceStatus.choices)
status = models.TextField(
choices=BlueprintInstanceStatus.choices, default=BlueprintInstanceStatus.UNKNOWN
)
enabled = models.BooleanField(default=True)
managed_models = ArrayField(models.TextField(), default=list)