Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,15 @@ public M003_WorkflowRevision_addDataRetension() : base("1.0.3") { }

public override void Up(BsonDocument document)
{
var workflow = document["Workflow"].AsBsonDocument;
workflow.Add("DataRetentionDays", -1, true);
try
{
var workflow = document["Workflow"].AsBsonDocument;
workflow.Add("DataRetentionDays", -1, true);
}
catch
{// can ignore we dont want failures stopping startup !
}

}

public override void Down(BsonDocument document)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,23 @@ public M004_WorkflowRevision_addConditions() : base("1.0.4") { }

public override void Up(BsonDocument document)
{
var workflow = document["Workflow"].AsBsonDocument;
workflow.Add("Conditions", new BsonArray { });
try
{
var workflow = document["Workflow"].AsBsonDocument;
workflow.Add("Predicate", new BsonArray { });
}
catch
{ // can ignore we dont want failures stopping startup !
}

}

public override void Down(BsonDocument document)
{
try
{
var workflow = document["Workflow"].AsBsonDocument;
workflow.Remove("Conditions");
workflow.Remove("Predicate");
}
catch
{ // can ignore we dont want failures stopping startup !
Expand Down
4 changes: 3 additions & 1 deletion src/WorkflowManager/Storage/Services/DicomService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,9 @@ public string GetValue(Dictionary<string, DicomValue> dict, string keyId)

if (dict.TryGetValue(DicomTagConstants.AccessionNumberTag, out var value))
{
return JsonConvert.SerializeObject(value.Value);
var accession = JsonConvert.SerializeObject(value.Value);
accession = accession.Replace("[\"", "").Replace("\"]", "");
return accession;
}
return null;
}
Expand Down