Skip to content

Commit fadc146

Browse files
authored
Update DFIQ yaml when saving (#1247)
1 parent f64cba0 commit fadc146

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

core/schemas/dfiq.py

+1
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ def load(cls, object: dict):
184184

185185
def save(self, *args, **kwargs) -> "DFIQBase":
186186
self.modified = now()
187+
self.dfiq_yaml = self.to_yaml()
187188
return super().save(*args, **kwargs)
188189

189190
@classmethod

tests/apiv2/dfiq.py

+1
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,7 @@ def test_dfiq_patch_object(self):
313313
self.assertEqual(len(data["approaches"][2]["steps"]), 1)
314314
self.assertEqual(data["approaches"][2]["steps"][0]["type"], "opensearch-query")
315315
self.assertEqual(data["approaches"][2]["steps"][0]["value"], "***")
316+
self.assertNotIn("mock", data["dfiq_yaml"])
316317

317318
def test_dfiq_patch_updates_parents(self) -> None:
318319
scenario1 = dfiq.DFIQScenario(

0 commit comments

Comments
 (0)