mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-16 09:48:27 +00:00
Added the research on individual participants to the BeyondFacts Lab (#1207)
This commit is contained in:
1 parent
3ca4b3878b
commit
92d0ff68f4
69 files changed
+3869
-186
No files matched your search
@@ -110,12 +110,18 @@ public sealed partial class BeyondFactsLabStore
|
||||
throw new InvalidDataException("This version of AI Studio cannot open the research.", exception);
|
||||
}
|
||||
|
||||
if (research is null || research.SchemaVersion is < 1 or > BflResearch.CURRENT_SCHEMA_VERSION || IsNull(research.Text) || IsNull(research.Details) || IsNull(research.SearchQueries) || IsNull(research.Pages))
|
||||
if (research is null || IsBroken(research))
|
||||
throw new InvalidDataException("This version of AI Studio cannot open the research.");
|
||||
|
||||
return research;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tells whether a stored research comes from a newer version of AI Studio, or lacks one of its parts.
|
||||
/// </summary>
|
||||
/// <param name="research">The research.</param>
|
||||
private static bool IsBroken(BflResearch research) => research.SchemaVersion is < 1 or > BflResearch.CURRENT_SCHEMA_VERSION || IsNull(research.Text) || IsNull(research.Details) || IsNull(research.SearchQueries) || IsNull(research.Pages) || IsNull(research.Participants) || research.Participants.Any(participant => IsNull(participant) || IsNull(participant.Name) || IsNull(participant.Entry));
|
||||
|
||||
/// <summary>
|
||||
/// Gets the file of the research of a preparation on one topic.
|
||||
/// </summary>
|
||||
|
||||
Reference in new issue
Block a user